public class CallbackInputPort extends InputPort
InputPort
.
Allows to specify a callback function which is executed whenever message indication is signalled from the connected output port. Three interfaces support different method signatures to make usage with java 1.8 closure syntax more convenient.
Modifier and Type | Class and Description |
---|---|
static interface |
CallbackInputPort.MessageIndicationHandler
callback interface with port and message arguments
|
static interface |
CallbackInputPort.MessageIndicationHandlerMessage
callback interface with message argument
|
static interface |
CallbackInputPort.MessageIndicationHandlerNoArgs
callback interface with no arguments
|
INPUT_PORT_NAME, prev
Constructor and Description |
---|
CallbackInputPort(Entity owner,
CallbackInputPort.MessageIndicationHandler msgIndicationhandler) |
CallbackInputPort(Entity owner,
CallbackInputPort.MessageIndicationHandlerMessage msgIndicationhandler) |
CallbackInputPort(Entity owner,
CallbackInputPort.MessageIndicationHandlerNoArgs msgIndicationhandler) |
CallbackInputPort(Entity owner,
java.lang.String portName,
CallbackInputPort.MessageIndicationHandler msgIndicationhandler) |
CallbackInputPort(Entity owner,
java.lang.String portName,
CallbackInputPort.MessageIndicationHandlerMessage msgIndicationhandler) |
CallbackInputPort(Entity owner,
java.lang.String portName,
CallbackInputPort.MessageIndicationHandlerNoArgs msgIndicationhandler) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleMessageIndication(Message msg) |
getConnectedOutputPort, getConnectedPort, handleGetMessage, handleIsMessageAvailable, setConnectedOutputPort
addPortMonitor, getDelimiter, getLocalName, getMessage, getName, getOwner, isConnected, isMessageAvailable, messageIndication, removePortMonitor
public CallbackInputPort(Entity owner, java.lang.String portName, CallbackInputPort.MessageIndicationHandler msgIndicationhandler)
public CallbackInputPort(Entity owner, CallbackInputPort.MessageIndicationHandler msgIndicationhandler)
public CallbackInputPort(Entity owner, java.lang.String portName, CallbackInputPort.MessageIndicationHandlerMessage msgIndicationhandler)
public CallbackInputPort(Entity owner, CallbackInputPort.MessageIndicationHandlerMessage msgIndicationhandler)
public CallbackInputPort(Entity owner, java.lang.String portName, CallbackInputPort.MessageIndicationHandlerNoArgs msgIndicationhandler)
public CallbackInputPort(Entity owner, CallbackInputPort.MessageIndicationHandlerNoArgs msgIndicationhandler)
protected void handleMessageIndication(Message msg)
handleMessageIndication
in class Port