Package jadex.bridge.component
Interface IMessageFeature
-
- All Known Implementing Classes:
BDIXMessageComponentFeature
,jadex.bridge.component.impl.MessageComponentFeature
public interface IMessageFeature
Feature for sending messages and handling incoming messages via handlers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addMessageHandler(IMessageHandler handler)
Add a message handler.IFuture<IInputConnection>
createInputConnection(IComponentIdentifier sender, IComponentIdentifier receiver, java.util.Map<java.lang.String,java.lang.Object> nonfunc)
Create a virtual input connection.IFuture<IOutputConnection>
createOutputConnection(IComponentIdentifier sender, IComponentIdentifier receiver, java.util.Map<java.lang.String,java.lang.Object> nonfunc)
Create a virtual output connection.void
removeMessageHandler(IMessageHandler handler)
Remove a message handler.IFuture<java.lang.Void>
sendMessage(java.lang.Object message, IComponentIdentifier... receiver)
Send a message.IFuture<java.lang.Void>
sendMessage(java.lang.Object message, java.util.Map<java.lang.String,java.lang.Object> addheaderfields, IComponentIdentifier... receiver)
Send a message.IFuture<java.lang.Object>
sendMessageAndWait(IComponentIdentifier receiver, java.lang.Object message)
Send a message and wait for a reply.IFuture<java.lang.Object>
sendMessageAndWait(IComponentIdentifier receiver, java.lang.Object message, java.lang.Long timeout)
Send a message and wait for a reply.IFuture<java.lang.Void>
sendReply(IMsgHeader header, java.lang.Object message)
Send a message reply.
-
-
-
Method Detail
-
sendMessage
IFuture<java.lang.Void> sendMessage(java.lang.Object message, IComponentIdentifier... receiver)
Send a message.- Parameters:
message
- The message.receiver
- The message receiver(s). At least one required unless given in message object (e.g. FipaMessage).
-
sendMessage
IFuture<java.lang.Void> sendMessage(java.lang.Object message, java.util.Map<java.lang.String,java.lang.Object> addheaderfields, IComponentIdentifier... receiver)
Send a message.- Parameters:
message
- The message.addheaderfields
- Additional header fields.receiver
- The message receiver(s). At least one required unless given in message object (e.g. FipaMessage).
-
sendMessageAndWait
IFuture<java.lang.Object> sendMessageAndWait(IComponentIdentifier receiver, java.lang.Object message)
Send a message and wait for a reply.- Parameters:
receiver
- The message receiver.message
- The message.- Returns:
- The reply.
-
sendMessageAndWait
IFuture<java.lang.Object> sendMessageAndWait(IComponentIdentifier receiver, java.lang.Object message, java.lang.Long timeout)
Send a message and wait for a reply.- Parameters:
receiver
- The message receiver.message
- The message.timeout
- The reply timeout.- Returns:
- The reply.
-
sendReply
IFuture<java.lang.Void> sendReply(IMsgHeader header, java.lang.Object message)
Send a message reply.- Parameters:
receivedmessageid
- ID of the received message that is being replied to.message
- The reply message.
-
addMessageHandler
void addMessageHandler(IMessageHandler handler)
Add a message handler.- Parameters:
The
- handler.
-
removeMessageHandler
void removeMessageHandler(IMessageHandler handler)
Remove a message handler.- Parameters:
handler
- The handler.
-
createOutputConnection
IFuture<IOutputConnection> createOutputConnection(IComponentIdentifier sender, IComponentIdentifier receiver, java.util.Map<java.lang.String,java.lang.Object> nonfunc)
Create a virtual output connection.- Parameters:
sender
- The sender.receiver
- The receiver.nonfunc
- The nonfunc props.
-
createInputConnection
IFuture<IInputConnection> createInputConnection(IComponentIdentifier sender, IComponentIdentifier receiver, java.util.Map<java.lang.String,java.lang.Object> nonfunc)
Create a virtual input connection.- Parameters:
sender
- The sender.receiver
- The receiver.nonfunc
- The nonfunc props.
-
-