public class MessageEventRules extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MESSAGEEVENTS_MAX
The maximum number of outstanding messages.
|
static Class |
TYPE
The Class object representing the class corresponding to
the this Class.
|
Constructor and Description |
---|
MessageEventRules() |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsRegisteredMessageEvents(jadex.rules.state.IOAVState state,
Object rcapa,
Object rmevent)
Test if a message has been registered.
|
static Object |
createReceivedMessageEvent(jadex.rules.state.IOAVState state,
Object mevent,
IMessageAdapter msg,
Object scope,
Object original)
Fill parameters of a message event from a native one.
|
static void |
deregisterMessageEvent(jadex.rules.state.IOAVState state,
Object rmevent,
Object rscope)
Remove a registered message event.
|
static boolean |
evaluateMatchExpression(jadex.rules.state.IOAVState state,
Object rcapa,
IMessageAdapter rawmsg,
Object matchexp)
Evaluate a match expression of a message event template.
|
static IContentCodec[] |
getContentCodecs(Object rcapa,
jadex.rules.state.IOAVState state)
Get a matching content codec.
|
static Object |
getInReplyMessageEvent(jadex.rules.state.IOAVState state,
IMessageAdapter rawmessage,
Object rscope)
Find a message event that the given native message is a reply to.
|
static MessageType |
getMessageEventType(jadex.rules.state.IOAVState state,
Object mme)
Get the message event type of a message event.
|
static Object |
getValue(IMessageAdapter message,
String name,
Object scope)
Get the value for a parameter, or the values
for a parameter set from a native message.
|
static Object |
initializeReply(jadex.rules.state.IOAVState state,
Object rcapa,
Object revent,
Object rreply)
Create a reply to this message event.
|
static Object |
instantiateMessageEvent(jadex.rules.state.IOAVState state,
Object rcapa,
Object mevent,
Object cevent,
Map bindings,
OAVBDIFetcher fetcher,
OAVBDIFetcher configfetcher)
Instantiate an message event.
|
static boolean |
match(jadex.rules.state.IOAVState state,
IMessageAdapter message,
Object mevent,
Object scope)
Match a message with a message event.
|
static void |
registerMessageEvent(jadex.rules.state.IOAVState state,
Object rmevent,
Object rcapa)
Register a conversation or reply_with to be able
to send back answers to the source capability.
|
static IFuture |
sendMessage(jadex.rules.state.IOAVState state,
Object rcapa,
Object rmessageevent,
byte[] codecids)
Send a message after some delay.
|
static boolean |
unequalParameterSetValues(jadex.rules.state.IOAVState state,
String paramsetname,
Object mevent,
IMessageAdapter rawmsg,
Object rcapa)
Test if two parameter values are equal.
|
static boolean |
unequalParameterValues(jadex.rules.state.IOAVState state,
String paramname,
Object mevent,
IMessageAdapter rawmsg,
Object rcapa)
Test if two parameter values are equal.
|
public static String MESSAGEEVENTS_MAX
public static final Class TYPE
public static Object instantiateMessageEvent(jadex.rules.state.IOAVState state, Object rcapa, Object mevent, Object cevent, Map bindings, OAVBDIFetcher fetcher, OAVBDIFetcher configfetcher)
state
- The statercapa
- The capability.mevent
- The event model.cevent
- The event configuration (if any).public static IFuture sendMessage(jadex.rules.state.IOAVState state, Object rcapa, Object rmessageevent, byte[] codecids)
me
- The message event.public static boolean unequalParameterValues(jadex.rules.state.IOAVState state, String paramname, Object mevent, IMessageAdapter rawmsg, Object rcapa)
state
- The state.paramname
- The parameter name.mevent
- The message event.rawmsg
- The message adapter.rcapa
- The capability.public static boolean unequalParameterSetValues(jadex.rules.state.IOAVState state, String paramsetname, Object mevent, IMessageAdapter rawmsg, Object rcapa)
state
- The state.paramname
- The parameter name.mevent
- The message event.rawmsg
- The message adapter.rcapa
- The capability.public static boolean evaluateMatchExpression(jadex.rules.state.IOAVState state, Object rcapa, IMessageAdapter rawmsg, Object matchexp)
state
- The state.rcapa
- The capability.rawmsg
- The message adapter.matchexp
- The match expression.public static boolean match(jadex.rules.state.IOAVState state, IMessageAdapter message, Object mevent, Object scope)
mevent
- The message event.public static Object getValue(IMessageAdapter message, String name, Object scope)
public static Object createReceivedMessageEvent(jadex.rules.state.IOAVState state, Object mevent, IMessageAdapter msg, Object scope, Object original)
public static void registerMessageEvent(jadex.rules.state.IOAVState state, Object rmevent, Object rcapa)
msgevent
- The message event.
todo: indexing for msgevents for speed.public static void deregisterMessageEvent(jadex.rules.state.IOAVState state, Object rmevent, Object rscope)
msgevent
- The message event.public static boolean containsRegisteredMessageEvents(jadex.rules.state.IOAVState state, Object rcapa, Object rmevent)
public static Object getInReplyMessageEvent(jadex.rules.state.IOAVState state, IMessageAdapter rawmessage, Object rscope)
message
- The (native) message.public static Object initializeReply(jadex.rules.state.IOAVState state, Object rcapa, Object revent, Object rreply)
msgeventtype
- The message event type.public static IContentCodec[] getContentCodecs(Object rcapa, jadex.rules.state.IOAVState state)
props
- The properties.public static MessageType getMessageEventType(jadex.rules.state.IOAVState state, Object mme)
Copyright © 2012. All Rights Reserved.