Class SomQmgrChannelControlCommand

  • All Implemented Interfaces:
    SomResponseProcessor

    public class SomQmgrChannelControlCommand
    extends SomQmgrCommand
    Class which provides Channel Control commands. Sub commands are: SOM_CHANNEL_STOP SOM_CHANNEL_START SOM_CHANNEL_DELAY_CLEAR SOM_CHANNEL_DELAY_SET SOM_CHANNEL_ENABLE_INBOUND SOM_CHANNEL_DISABLE_INBOUND SOM_CHANNEL_CONNECT SOM_CHANNEL_MINIMISE
    Author:
    tc
    • Constructor Detail

      • SomQmgrChannelControlCommand

        public SomQmgrChannelControlCommand​(SomSession session,
                                            int op,
                                            SomQmgrHandler object,
                                            SomCommandListener listener)
        Create a new SomQmgrChannelControlCommand object.
        Parameters:
        session - Session with which command is associated
        op - Subcommand code
        object - Result handler object
        listener - Listener for notification of operation completion
      • SomQmgrChannelControlCommand

        public SomQmgrChannelControlCommand​(SomSession session,
                                            int op,
                                            SomQmgrSelector sel,
                                            SomQmgrHandler object,
                                            SomCommandListener listener)
        Create a new SomQmgrChannelControlCommand object, with Selector.
        Parameters:
        session - Session with which command is associated
        op - Subcommand code
        sel - Selector to include
        object - Result handler object
        listener - Listener for notification of operation completion
    • Method Detail

      • setDelay

        public void setDelay​(SomUtcTime d)
        Configure the delay value to be used in the DELAY SET subcommand
        Parameters:
        d - The time until which to delay the channel
      • setMtaName

        public void setMtaName​(java.lang.String m)
        Set the MTA name value to be used in the CHANNEL CONNECT subcommand
        Parameters:
        m - MTA name to connect to
      • haveMta

        public void haveMta​(java.lang.Boolean val)
        Set flag which indicates whether an mtaname regexp should be included in some control commands.
        Parameters:
        val - indicates whether this command should include a regexp or not
        Since:
        R16.6
      • setMinimiseStart

        public void setMinimiseStart​(SomUtcTime time)
        Set the start time for the MINIMISE operation
        Parameters:
        time - at which MIMIMISE operation should come in to force
      • setMinimiseStop

        public void setMinimiseStop​(SomUtcTime time)
        Set the stop time for the MINIMISE operation
        Parameters:
        time - at which MIMIMISE operation should stop
      • setMinimisePriority

        public void setMinimisePriority​(int max)
        Set the maximum priority to which the MINIMISE operation should apply
        Parameters:
        max - priority for MINIMISE operation
      • setReason

        public void setReason​(java.lang.String r)
        Set the reason string for NONDELIVER MESSAGES operation
        Parameters:
        r - reason string to insert into NDR
      • getSubcommand

        public java.lang.String getSubcommand()
                                       throws SomException
        Get the sub command string
        Returns:
        subcommand string
        Throws:
        SomException
      • addSelector

        public void addSelector​(SomQmgrSelector sel)
        Add a selector into a command object
        Parameters:
        sel - Selector to add
      • getCommandString

        public java.lang.String getCommandString()
                                          throws SomException
        Get the command string to be sent to the Queue Manager
        Overrides:
        getCommandString in class SomCommand
        Returns:
        command string
        Throws:
        SomException - Indicating a problem with the command