Class MessageListener
java.lang.Object
org.sentrysoftware.ipmi.core.api.sync.MessageListener
- All Implemented Interfaces:
IpmiResponseListener
Listens to the
IpmiAsyncConnector waiting for concrete message to
arrive. Must be registered via
IpmiAsyncConnector.registerListener(IpmiResponseListener) to receive
messages.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidnotify(IpmiResponse response) Notifies listener of action that occurred.waitForAnswer(int tag) Blocks the invoking thread until deserved message arrives (tag and handle as specified inMessageListener(ConnectionHandle)).
-
Constructor Details
-
MessageListener
Initiates theMessageListener- Parameters:
handle- -ConnectionHandleassociated with theConnectionMessageListeneris expecting message from.
-
-
Method Details
-
waitForAnswer
Blocks the invoking thread until deserved message arrives (tag and handle as specified inMessageListener(ConnectionHandle)).- Parameters:
tag- - tag of the expected message- Returns:
ResponseDatafor message.- Throws:
Exception- when message delivery fails
-
notify
Description copied from interface:IpmiResponseListenerNotifies listener of action that occurred.- Specified by:
notifyin interfaceIpmiResponseListener- Parameters:
response-- -
IpmiResponsebeing notified - -
IpmiResponseDataif answer for request arrived, - -
IpmiErrorif delivery failed.
- -
-