Class JoramHelper


  • public class JoramHelper
    extends Object
    Administration stuff for internal use.

    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.

    • Constructor Detail

      • JoramHelper

        public JoramHelper()
    • Method Detail

      • createUser

        public static final void createUser​(String userName,
                                            String userPass)
        Create user.
        Parameters:
        userName - user name
        userPass - user password
      • createDestination

        public static final AgentId createDestination​(String destName,
                                                      AgentId adminId,
                                                      String destClassName,
                                                      byte type,
                                                      Properties properties,
                                                      boolean freerw)
                                               throws Exception
        Instantiating the destination class or retrieving the destination.
        Parameters:
        destName - destination name
        adminId - Agent Id. of the administrator (null for TopicAdmin)
        destClassName - destination class name
        type - destination type
        properties - destination properties
        freerw - if true rights all users can read and write the destination.
        Returns:
        destination AgentId
        Throws:
        Exception
      • createDestination

        public static final AgentId createDestination​(String destName,
                                                      AgentId adminId,
                                                      String destClassName,
                                                      byte type,
                                                      Properties properties,
                                                      boolean freeReading,
                                                      boolean freeWriting)
                                               throws Exception
        Instantiating the destination class or retrieving the destination.
        Parameters:
        destName - destination name
        adminId - Agent Id. of the administrator (null for TopicAdmin)
        destClassName - destination class name
        type - destination type
        properties - destination properties
        freeReading - if true rights all users can read and write the destination.
        freeWriting - if true rights all users can read and write the destination.
        Returns:
        destination AgentId
        Throws:
        Exception
      • deleteQueueMessage

        public static final boolean deleteQueueMessage​(String queueName,
                                                       String msgId)
        Delete a message in a queue
        Parameters:
        queueName - Name of the queue
        msgId - ID of the message to be deleted
        Returns:
      • deleteSubMessage

        public static final boolean deleteSubMessage​(String userName,
                                                     String subName,
                                                     String msgId)
        Deletes a message in a subscription
        Parameters:
        userName - Subscriber's name
        subName - Subscription name
        msgId - ID of the message to be deleted
        Returns:
      • clearQueue

        public static final boolean clearQueue​(String queueName)
        Clears all pending message of a queue
        Parameters:
        queueName - Name of the queue
        Returns:
      • clearSubscription

        public static final boolean clearSubscription​(String userName,
                                                      String subName)
        Clears all pending message of a subscription
        Parameters:
        userName - Subscriber's name
        subName - Subscription name
        Returns: