public class JoramHelper extends Object
The functions use the AdminTopic to perform the operations. The AdminTopic agent is called directly from the calling agent, so special care should be taken to ensure consistency. JoramHelper functions should be called from an agent reaction, and they should save the state of the AdminTopic agent so that the new state is committed with the current reaction.
Modifier and Type | Field and Description |
---|---|
static int |
CLIENT_CONTEXT_CLASS_ID |
static int |
CLIENT_MESSAGES_CLASS_ID |
static int |
CLIENT_SUBSCRIPTION_CLASS_ID |
static int |
ENCODABLE_CLASS_ID_AREA |
static String |
JNDI_HOST |
static String |
JNDI_INITIAL |
static String |
JNDI_PORT |
static org.objectweb.util.monolog.api.Logger |
logger
class specific logger
|
static int |
MESSAGE_CLASS_ID |
static int |
MESSAGE_ID_LIST_IMPL_CLASS_ID |
static int |
QUEUE_ARRIVAL_STATE_CLASS_ID |
static int |
QUEUE_CLASS_ID |
static int |
QUEUE_DELIVERY_TABLE_CLASS_ID |
static int |
TOPIC_FWD_NOT_CLASS_ID |
static int |
USER_AGENT_ARRIVAL_STATE_CLASS_ID |
static int |
USER_AGENT_CLASS_ID |
Constructor and Description |
---|
JoramHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
clearQueue(String queueName)
Clears all pending message of a queue
|
static boolean |
clearSubscription(String userName,
String subName)
Clears all pending message of a subscription
|
static AgentId |
createDestination(String destName,
AgentId adminId,
String destClassName,
byte type,
Properties properties,
boolean freerw)
Instantiating the destination class or retrieving the destination.
|
static AgentId |
createDestination(String destName,
AgentId adminId,
String destClassName,
byte type,
Properties properties,
boolean freeReading,
boolean freeWriting)
Instantiating the destination class or retrieving the destination.
|
static void |
createUser(String userName,
String userPass)
Create user.
|
static boolean |
deleteQueueMessage(String queueName,
String msgId)
Delete a message in a queue
|
static boolean |
deleteSubMessage(String userName,
String subName,
String msgId)
Deletes a message in a subscription
|
public static org.objectweb.util.monolog.api.Logger logger
public static final String JNDI_INITIAL
public static final String JNDI_HOST
public static final String JNDI_PORT
public static final int ENCODABLE_CLASS_ID_AREA
public static final int MESSAGE_CLASS_ID
public static final int QUEUE_CLASS_ID
public static final int USER_AGENT_CLASS_ID
public static final int CLIENT_SUBSCRIPTION_CLASS_ID
public static final int CLIENT_CONTEXT_CLASS_ID
public static final int MESSAGE_ID_LIST_IMPL_CLASS_ID
public static final int USER_AGENT_ARRIVAL_STATE_CLASS_ID
public static final int QUEUE_DELIVERY_TABLE_CLASS_ID
public static final int QUEUE_ARRIVAL_STATE_CLASS_ID
public static final int TOPIC_FWD_NOT_CLASS_ID
public static final int CLIENT_MESSAGES_CLASS_ID
public static final void createUser(String userName, String userPass)
userName
- user nameuserPass
- user passwordpublic static final AgentId createDestination(String destName, AgentId adminId, String destClassName, byte type, Properties properties, boolean freerw) throws Exception
destName
- destination nameadminId
- Agent Id. of the administrator (null for TopicAdmin)destClassName
- destination class nametype
- destination typeproperties
- destination propertiesfreerw
- if true rights all users can read and write the destination.Exception
public static final AgentId createDestination(String destName, AgentId adminId, String destClassName, byte type, Properties properties, boolean freeReading, boolean freeWriting) throws Exception
destName
- destination nameadminId
- Agent Id. of the administrator (null for TopicAdmin)destClassName
- destination class nametype
- destination typeproperties
- destination propertiesfreeReading
- if true rights all users can read and write the destination.freeWriting
- if true rights all users can read and write the destination.Exception
public static final boolean deleteQueueMessage(String queueName, String msgId)
queueName
- Name of the queuemsgId
- ID of the message to be deletedpublic static final boolean deleteSubMessage(String userName, String subName, String msgId)
userName
- Subscriber's namesubName
- Subscription namemsgId
- ID of the message to be deletedpublic static final boolean clearQueue(String queueName)
queueName
- Name of the queueCopyright © 2021 ScalAgent D.T.. All rights reserved.