Class InboundSolMessageListener
java.lang.Object
org.sentrysoftware.ipmi.core.api.async.InboundSolMessageListener
- All Implemented Interfaces:
InboundMessageListener
Listener for inbound SOL messages sent by remote system to this application.
-
Constructor Summary
ConstructorsConstructorDescriptionInboundSolMessageListener(IpmiConnector connector, ConnectionHandle connectionHandle, List<SolEventListener> eventListeners) -
Method Summary
Modifier and TypeMethodDescriptionintReturns number of incoming bytes that are available to read from the buffer.booleanisPayloadSupported(IpmiPayload payload) Checks if given payload is supported by thisInboundMessageListenerinstance.voidnotify(IpmiPayload payload) Notify listener about received inbound message.byte[]readBytes(int numberOfBytes) Attempts to read given number of bytes from thisByteBuffer.
-
Constructor Details
-
InboundSolMessageListener
public InboundSolMessageListener(IpmiConnector connector, ConnectionHandle connectionHandle, List<SolEventListener> eventListeners)
-
-
Method Details
-
isPayloadSupported
Description copied from interface:InboundMessageListenerChecks if given payload is supported by thisInboundMessageListenerinstance. This method should be called prior to invokingInboundMessageListener.notify(IpmiPayload).- Specified by:
isPayloadSupportedin interfaceInboundMessageListener- Parameters:
payload-IpmiPayloadinstance to check- Returns:
- true if payload is supported by this object, false otherwise
-
notify
Description copied from interface:InboundMessageListenerNotify listener about received inbound message. This method should be invoked only with payload for whichInboundMessageListener.isPayloadSupported(IpmiPayload)returned true.- Specified by:
notifyin interfaceInboundMessageListener- Parameters:
payload- payload extracted from inbound message
-
readBytes
public byte[] readBytes(int numberOfBytes) Attempts to read given number of bytes from thisByteBuffer. If buffer currently contains less bytes than requested, this method reads only available number of bytes.- Parameters:
numberOfBytes- requested number of bytes to read- Returns:
- actual bytes that could be read from this buffer.
-
getAvailableBytesCount
public int getAvailableBytesCount()Returns number of incoming bytes that are available to read from the buffer.- Returns:
- number of available bytes to read
-