public class BDIXMessageComponentFeature
extends MessageComponentFeature
Modifier and Type | Class and Description |
---|---|
class |
BDIXMessageComponentFeature.HandleBDIMessageStep
Step to handle a message.
|
class |
BDIXMessageComponentFeature.HandleBDIStreamStep
Step to handle a message.
|
Modifier and Type | Field and Description |
---|---|
static IComponentFeatureFactory |
FACTORY
The factory.
|
protected long |
mevents_max
The maximum number of outstanding messages.
|
protected java.util.List<RMessageEvent> |
sent_mevents
Send message tracking (reply_with->Entry).
|
Constructor and Description |
---|
BDIXMessageComponentFeature(IInternalAccess component,
ComponentCreationInfo cinfo)
Create the feature.
|
Modifier and Type | Method and Description |
---|---|
protected IComponentStep<java.lang.Void> |
createHandleMessageStep(IMessageAdapter message)
Helper method to override message handling.
|
protected IComponentStep<java.lang.Void> |
createHandleStreamStep(IConnection con)
Helper method to override stream handling.
|
RMessageEvent |
getInReplyMessageEvent(IMessageAdapter message)
Find a message event that the given native message is a reply to.
|
static boolean |
isReply(RMessageEvent msg,
RMessageEvent reply)
Test is a message is a reply of another message.
|
boolean |
match(MMessageEvent msgevent,
java.util.Map<java.lang.String,java.lang.Object> msg,
MessageType mt)
Match a message with a message event.
|
protected int |
matchMessageEvents(java.util.Map<java.lang.String,java.lang.Object> message,
java.util.List<MMessageEvent> mevents,
java.util.List<MMessageEvent> matched,
java.util.List<MMessageEvent> events,
int degree,
MessageType mt)
Match message events with a message adapter.
|
protected void |
registerMessageEvent(RMessageEvent msgevent)
Register a conversation or reply-with to be able
to send back answers to the source capability.
|
public static final IComponentFeatureFactory FACTORY
protected java.util.List<RMessageEvent> sent_mevents
protected long mevents_max
public BDIXMessageComponentFeature(IInternalAccess component, ComponentCreationInfo cinfo)
protected IComponentStep<java.lang.Void> createHandleMessageStep(IMessageAdapter message)
protected IComponentStep<java.lang.Void> createHandleStreamStep(IConnection con)
protected int matchMessageEvents(java.util.Map<java.lang.String,java.lang.Object> message, java.util.List<MMessageEvent> mevents, java.util.List<MMessageEvent> matched, java.util.List<MMessageEvent> events, int degree, MessageType mt)
public boolean match(MMessageEvent msgevent, java.util.Map<java.lang.String,java.lang.Object> msg, MessageType mt)
msgevent
- The message event.protected void registerMessageEvent(RMessageEvent msgevent)
msgevent
- The message event.
//@param replywith The reply-with tag.
todo: indexing for msgevents for speed.public RMessageEvent getInReplyMessageEvent(IMessageAdapter message)
message
- The (native) message.public static boolean isReply(RMessageEvent msg, RMessageEvent reply)
message
- The (native) message.