Class EndpointImpl

    • Constructor Detail

      • EndpointImpl

        public EndpointImpl​(jakarta.jms.QueueConnection connection,
                            jakarta.jms.QueueSession senderSession,
                            jakarta.jms.QueueSender sender,
                            jakarta.jms.QueueSession receiverSession,
                            jakarta.jms.QueueReceiver receiver,
                            jakarta.jms.TemporaryQueue replyQueue,
                            RequestService requestService,
                            boolean createInternalCommands)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • connect

        public void connect​(int connectId,
                            java.lang.String hostname,
                            java.lang.String toolName,
                            boolean subscribeRouteInfos,
                            boolean subscribeRouterConfig,
                            boolean subscribeChangeEvents)
                     throws java.lang.Exception
        Specified by:
        connect in interface Endpoint
        Throws:
        java.lang.Exception
      • authenticate

        public void authenticate​(java.lang.String password)
                          throws java.lang.Exception
        Specified by:
        authenticate in interface Endpoint
        Throws:
        java.lang.Exception
      • isStarted

        public boolean isStarted()
        Specified by:
        isStarted in interface Endpoint
      • setStarted

        public void setStarted​(boolean started)
        Specified by:
        setStarted in interface Endpoint
      • setRouteInfos

        public void setRouteInfos​(boolean routeInfos)
        Specified by:
        setRouteInfos in interface Endpoint
      • getRouterName

        public java.lang.String getRouterName()
        Specified by:
        getRouterName in interface Endpoint
      • setRouterName

        public void setRouterName​(java.lang.String routerName)
        Specified by:
        setRouterName in interface Endpoint
      • getActContext

        public java.lang.String[] getActContext()
        Specified by:
        getActContext in interface Endpoint
      • setActContext

        public void setActContext​(java.lang.String[] actContext)
        Specified by:
        setActContext in interface Endpoint
      • contextShown

        public void contextShown​(java.lang.String[] context,
                                 boolean includeNextLevel)
        Specified by:
        contextShown in interface Endpoint
      • contextHidden

        public void contextHidden​(java.lang.String[] context,
                                  boolean includeNextLevel)
        Specified by:
        contextHidden in interface Endpoint
      • startLease

        public void startLease​(long interval)
        Specified by:
        startLease in interface Endpoint
      • request

        public Reply request​(Request request)
                      throws java.lang.Exception
        Specified by:
        request in interface Endpoint
        Throws:
        java.lang.Exception
      • execute

        public java.lang.String[] execute​(java.lang.String[] context,
                                          Entity entity,
                                          java.lang.String[] command)
        Description copied from interface: CommandExecutor
        Called to execute the command. This method is called from the MgmtSwiftlet when a user performs the command with CLI or SwiftMQ Explorer. The context parameter contains the current command context, that is, for example, String[]{"sys$queuemanager","queues"} for "/sys$queuemanager/queues". The entity is the Entity object where the command is attached to, and parameter are the parameters, given to this command. For example, the command "new testqueue1 cache-size 200" will be translated into the parameter String[]{"new","testqueue1","cache-size","200"}.

        This method has to validate the parameters and executes the command. It returns a String array which is either null (means success) or the following structure:

        • String[0] contains "Error:" if an error has occured or "Information:" if an information should be displayed to the user.
        • String[1] contains the error resp. the info message


        Examples:

        • return new String[]{"Information:", "To activate this Change, a Reboot of this Router is required."};
        • return new String[]{"Error:", "Mandatory Property '" + p.getName() + "' must be set."};
        • return new String[]{"Error:", e.getMessage()};
        Specified by:
        execute in interface CommandExecutor
        Specified by:
        execute in interface Endpoint
        Parameters:
        context - current context.
        entity - parent entity.
        command - command parameter.
        Returns:
        state structure.
      • onMessage

        public void onMessage​(jakarta.jms.Message message)
        Specified by:
        onMessage in interface jakarta.jms.MessageListener
      • close

        public void close()
        Specified by:
        close in interface Endpoint