public class MessageListener extends java.lang.Object implements IpmiListener
IpmiAsyncConnector
waiting for concrete message to
arrive. Must be registered via
IpmiAsyncConnector.registerListener(IpmiListener)
to receive
messages.Constructor and Description |
---|
MessageListener(ConnectionHandle handle)
Initiates the
MessageListener |
Modifier and Type | Method and Description |
---|---|
void |
notify(IpmiResponse response)
Notifies listener of action that occurred.
|
ResponseData |
waitForAnswer(int tag)
Blocks the invoking thread until deserved message arrives (tag and handle
as specified in
MessageListener(ConnectionHandle) ). |
public MessageListener(ConnectionHandle handle)
MessageListener
handle
- - ConnectionHandle
associated with the
Connection
MessageListener
is expecting
message from.public ResponseData waitForAnswer(int tag) throws java.lang.Exception
MessageListener(ConnectionHandle)
).tag
- - tag of the expected messageResponseData
for message.java.lang.Exception
- when message delivery failspublic void notify(IpmiResponse response)
IpmiListener
notify
in interface IpmiListener
response
- - IpmiResponse
being notified IpmiResponseData
if answer for request arrived, IpmiError
if delivery failed.