Class SomQmgrMta

    • Constructor Detail

      • SomQmgrMta

        public SomQmgrMta​(SomSession session)
        Create a new MTA object
        Parameters:
        session - Session which the message is associated with, which cannot be null
      • SomQmgrMta

        public SomQmgrMta​(SomSession session,
                          java.lang.String[] pairs)
        Create a new MTA object, populating it from the attribute pairs
        Parameters:
        session - Session which the message is associated with, which cannot be null
        pairs - Attribute pairs to use which cannot be null
    • Method Detail

      • setSomVersion

        public void setSomVersion​(java.lang.Integer v)
        Set the SOM version associated with this MTA
        Parameters:
        v - the version of SOM protocol used to access this MTA
      • getMtaName

        public java.lang.String getMtaName()
        Get the name of this MTA
        Returns:
        The String representation of this MTA or "Unknown".
      • parsePairs

        public void parsePairs​(java.lang.String[] pairs)
        Parse the Attribute pairs passed in
        Overrides:
        parsePairs in class SomQmgrObject
        Parameters:
        pairs - Array of attribute type:value strings which may not be null
      • addMessage

        public void addMessage​(SomQmgrMessage object)
        Add a new message to the object
        Parameters:
        object - Message to add which cannot be null
      • getMessages

        public SomQmgrMessage[] getMessages()
        Get the messages subordinate to this MTA
        Returns:
        Array of messages
      • removeFromArray

        public void removeFromArray​(java.util.ArrayList<SomQmgrMta> mtas)
        Remove this MTA from the array passed in
        Parameters:
        mtas - Array of MTAs from which this one should be remove, which cannot be null
      • getInboundMessages

        public SomQmgrInboundMessage[] getInboundMessages()
        Get the inbound messages subordinate to this MTA
        Returns:
        Array of inbound messages
      • getAssociations

        public SomQmgrAssociation[] getAssociations()
        Get the associations subordinate to this MTA
        Returns:
        Array of associations
      • getSchedules

        public SomQmgrSchedule[] getSchedules()
        Get the schedules subordinate to this MTA
        Returns:
        Array of schedules
      • handleResponse

        public void handleResponse​(SomCommand command,
                                   int status,
                                   java.lang.String detail)
        Description copied from interface: SomQmgrHandler
        Handles the response to control commands which return an OK/error response plus an info string
        Specified by:
        handleResponse in interface SomHandler
        Specified by:
        handleResponse in interface SomQmgrHandler
        Parameters:
        command - the SOM command
        status - operation status
        detail - detail on error
      • handleResponse

        public void handleResponse​(SomCommand command,
                                   int status,
                                   java.lang.String[] pairs)
        Description copied from interface: SomQmgrHandler
        Handles the response to commands which return data about the current object - i.e. we are refreshing an existing object.
        Specified by:
        handleResponse in interface SomQmgrHandler
        Parameters:
        command - the SOM command
        status - operation status
        pairs - data pairs
      • handleResponse

        public void handleResponse​(SomCommand command,
                                   int status,
                                   SomQmgrMta object)
        Description copied from interface: SomQmgrHandler
        Handles the response to commands which return a list of MTA objects
        Specified by:
        handleResponse in interface SomQmgrHandler
        Parameters:
        command - the SOM command
        status - operation status
        object - a SOM Qmgr MTA object
      • handleResponse

        public void handleResponse​(SomCommand command,
                                   int status,
                                   SomQmgrChannel object)
        Description copied from interface: SomQmgrHandler
        Handles the response to commands which return a list of channel objects
        Specified by:
        handleResponse in interface SomQmgrHandler
        Parameters:
        command - the SOM command
        status - operation status
        object - a channel object
      • handleResponse

        public void handleResponse​(SomCommand obj,
                                   int status,
                                   SomMessage msg)
        Description copied from interface: SomQmgrHandler
        Handles the response to commands which return a SomMessage object (i.e. read from the Queue or Archive).
        Specified by:
        handleResponse in interface SomQmgrHandler
        Parameters:
        obj - the SOM command
        status - operation status
        msg - a message object
      • handleBindResponse

        public void handleBindResponse​(int status,
                                       java.lang.String detail)
        Description copied from interface: SomHandler
        Handle the response to a Bind operation
        Specified by:
        handleBindResponse in interface SomHandler
        Parameters:
        status - operation status
        detail - error detail on failure
      • handleResponse

        public void handleResponse​(SomCommand command,
                                   int status,
                                   SomQmgrMessage object)
        Description copied from interface: SomQmgrHandler
        Handles the response to commands which return a list of message objects
        Specified by:
        handleResponse in interface SomQmgrHandler
        Parameters:
        command - the SOM command
        status - operation status
        object - a qmgr message object
      • getStatus

        public void getStatus​(SomCommandListener listener)
                       throws SomException
        Update the status of this MTA object by querying the Queue Manager
        Parameters:
        listener - Listener to notify when update complete, which may be null
        Throws:
        SomException - on error
      • refreshSubordinates

        public void refreshSubordinates​(SomCommandListener listener)
                                 throws SomException
        Refresh the list of subordinate messages of this MTA
        Parameters:
        listener - Listener to notify when update complete, which may be null
        Throws:
        SomException - on error
      • refreshSubordinates

        public void refreshSubordinates​(SomCommandListener listener,
                                        java.lang.Integer sizelimit)
                                 throws SomException
        Refresh the list of subordinate messages of this MTA, with size limit
        Parameters:
        listener - Listener to notify when update complete, which may be null
        sizelimit - Limit on number of entries to return, which may not be null
        Throws:
        SomException - on error
      • buildInfoString

        public java.lang.String buildInfoString()
        Generate an information string for this MTA
        Returns:
        info string
      • getSubordinateMessages

        public void getSubordinateMessages​(SomCommandListener listener)
                                    throws SomException
        Get the subordinate messages of this MTA
        Parameters:
        listener - Listener to notify when update complete, which may be null
        Throws:
        SomException - on error
      • getSubordinateMessages

        public void getSubordinateMessages​(SomCommandListener listener,
                                           java.lang.Integer sizelimit)
                                    throws SomException
        Get the subordinate messages of this MTA
        Parameters:
        listener - Listener to notify when update complete, which may be null
        sizelimit - Limit on number of messages, which may not be null
        Throws:
        SomException - on error
      • clear

        public void clear​(SomCommandListener listener)
                   throws SomException
        Clear any delay on this MTA
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • enable

        public void enable​(SomCommandListener listener)
                    throws SomException
        Enable this MTA, if disabled
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • disable

        public void disable​(SomCommandListener listener)
                     throws SomException
        Disable this MTA
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • delay

        public void delay​(int mins,
                          SomCommandListener listener)
                   throws SomException
        Delay this MTA
        Parameters:
        mins - Number of minutes to delay by
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • downwardsforce

        public void downwardsforce​(SomCommandListener listener)
                            throws SomException
        Clear delays and enable this MTA and subordinate messages
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • reprocess

        public void reprocess​(SomCommandListener listener)
                       throws SomException
        Reprocess all messages on this MTA
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • delete

        public void delete​(SomCommandListener listener)
                    throws SomException
        Delete this permanent peer MTA
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • connect

        public void connect​(SomCommandListener listener)
                     throws SomException
        Connect to this permanent peer MTA
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • disconnect

        public void disconnect​(SomCommandListener listener)
                        throws SomException
        Disconnect from this permanent peer MTA
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • enableInbound

        public void enableInbound​(SomCommandListener listener)
                           throws SomException
        Enable inbound connections to this peer MTA
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • disableInbound

        public void disableInbound​(SomCommandListener listener)
                            throws SomException
        Disable inbound connections to this peer MTA
        Parameters:
        listener - Listener to notify when operation is complete, which may be null
        Throws:
        SomException - on error
      • active

        public java.lang.String active()
                                throws SomException
        Test whether this MTA is active or not
        Returns:
        true if MTA is active
        Throws:
        SomException - on error
      • activeNumber

        public java.lang.Integer activeNumber()
                                       throws SomException
        Get number of active associations on this MTA
        Returns:
        Number of active associations
        Throws:
        SomException - on error
      • cachedUntil

        public java.lang.String cachedUntil()
                                     throws SomException
        Get time until which this MTA is cached
        Returns:
        Time until which MTA is cached (UTC Time String)
        Throws:
        SomException - on error
      • channel

        public java.lang.String channel()
                                 throws SomException
        Get channel name for this MTA
        Returns:
        Channel name
        Throws:
        SomException - on error
      • enabled

        public java.lang.String enabled()
                                 throws SomException
        Get string indicating whether MTA is enabled
        Returns:
        String "True" if MTA enabled, else "False"
        Throws:
        SomException - on error
      • activeBool

        public boolean activeBool()
                           throws SomException
        Test whether MTA active
        Returns:
        true if active
        Throws:
        SomException - on error
      • enabledBool

        public boolean enabledBool()
                            throws SomException
        Test whether MTA enabled
        Returns:
        true if enabled
        Throws:
        SomException - on error
      • info

        public java.lang.String info()
                              throws SomException
        Get information string for Peer MTA
        Returns:
        Information string
        Throws:
        SomException - on error
      • lastAttempt

        public java.lang.String lastAttempt()
                                     throws SomException
        Get time of last attempted connection
        Returns:
        Time of last attempted connection (UTC time string)
        Throws:
        SomException - on error
      • lastSuccess

        public java.lang.String lastSuccess()
                                     throws SomException
        Get time of last successful connection
        Returns:
        Time of last successful connection (UTC time string)
        Throws:
        SomException - on error
      • mta

        public java.lang.String mta()
                             throws SomException
        Get MTA name
        Returns:
        MTA Name
        Throws:
        SomException - on error
      • numberMessages

        public java.lang.Integer numberMessages()
                                         throws SomException
        Get number of messages queued
        Returns:
        Number of messages on MTA
        Throws:
        SomException - on error
      • numberReports

        public java.lang.Integer numberReports()
                                        throws SomException
        Get number of reports queued
        Returns:
        Number of reports on MTA
        Throws:
        SomException - on error
      • oldestMessage

        public java.lang.String oldestMessage()
                                       throws SomException
        Get age of oldest message
        Returns:
        Age of oldest message (UTC Time string)
        Throws:
        SomException - on error
      • volumeMessages

        public java.lang.Integer volumeMessages()
                                         throws SomException
        Get volume of messages queued
        Returns:
        Volume of messages on MTA (bytes)
        Throws:
        SomException - on error
      • addressesIn

        public java.lang.Integer addressesIn()
                                      throws SomException
        Get total number of inbound addresses handled
        Returns:
        Total number of inbound addresses
        Throws:
        SomException - on error
      • addressesOut

        public java.lang.Integer addressesOut()
                                       throws SomException
        Get total number of outbound addresses handled
        Returns:
        Total number of outbound addresses
        Throws:
        SomException - on error
      • creationTime

        public java.lang.String creationTime()
                                      throws SomException
        Get creation time of this MTA
        Returns:
        Creation time of MTA (UTC Time string)
        Throws:
        SomException - on error
      • description

        public java.lang.String description()
                                     throws SomException
        Get MTA description
        Returns:
        MTA description
        Throws:
        SomException - on error
      • enabledInboundBool

        public boolean enabledInboundBool()
                                   throws SomException
        Check whether this MTA is enabled for inbound connections
        Returns:
        true if enabled for inbound connections
        Throws:
        SomException - on error
      • enabledInbound

        public java.lang.String enabledInbound()
                                        throws SomException
        Check whether this MTA is enabled for inbound connections
        Returns:
        "True" if enabled for inbound connections
        Throws:
        SomException - on error
      • errorCount

        public java.lang.Integer errorCount()
                                     throws SomException
        Get count of errors on this MTA
        Returns:
        error count
        Throws:
        SomException - on error
      • failedConversions

        public java.lang.Integer failedConversions()
                                            throws SomException
        Get count of failed conversions on this MTA
        Returns:
        count of failed conversions
        Throws:
        SomException - on error
      • failedOutAssoc

        public java.lang.Integer failedOutAssoc()
                                         throws SomException
        Get count of failed outbound associations on this MTA
        Returns:
        count of failed outbound associations
        Throws:
        SomException - on error
      • hierarchy

        public java.lang.Integer hierarchy()
                                    throws SomException
        Get this MTA's hierarchy value
        Returns:
        hierarchy value
        Throws:
        SomException - on error
      • inAssoc

        public java.lang.Integer inAssoc()
                                  throws SomException
        Get current number of inbound associations on this MTA
        Returns:
        current number of inbound associations
        Throws:
        SomException - on error
      • index

        public java.lang.Integer index()
                                throws SomException
        Get this MTA's index value
        Returns:
        index value
        Throws:
        SomException - on error
      • lastInboundTime

        public java.lang.String lastInboundTime()
                                         throws SomException
        Get time of last inbound association on this MTA
        Returns:
        time of inbound associations (UTC Time string)
        Throws:
        SomException - on error
      • lastOutboundTime

        public java.lang.String lastOutboundTime()
                                          throws SomException
        Get time of last outbound association on this MTA
        Returns:
        time of outbound associations (UTC Time string)
        Throws:
        SomException - on error
      • loopsDetected

        public java.lang.Integer loopsDetected()
                                        throws SomException
        Get count of loops detected on this MTA
        Returns:
        count of loops detected
        Throws:
        SomException - on error
      • maxInboundConnections

        public java.lang.Integer maxInboundConnections()
                                                throws SomException
        Get maximum permitted number of inbound connections
        Returns:
        maximum permitted inbound connections
        Throws:
        SomException - on error
      • maxOutboundConnections

        public java.lang.Integer maxOutboundConnections()
                                                 throws SomException
        Get maximum permitted number of outbound connections
        Returns:
        maximum permitted outbound connections
        Throws:
        SomException - on error
      • messagesIn

        public java.lang.Integer messagesIn()
                                     throws SomException
        Get total number of inbound messages received
        Returns:
        total number of inbound messages received
        Throws:
        SomException - on error
      • messagesOut

        public java.lang.Integer messagesOut()
                                      throws SomException
        Get total number of outbound messages sent
        Returns:
        total number of outbound messages sent
        Throws:
        SomException - on error
      • mtaConnectingBool

        public boolean mtaConnectingBool()
                                  throws SomException
        Test whether MTA is currently connecting
        Returns:
        true if connecting
        Throws:
        SomException - on error
      • mtaConnecting

        public java.lang.String mtaConnecting()
                                       throws SomException
        Test whether MTA is currently connecting
        Returns:
        string "True" if connecting
        Throws:
        SomException - on error
      • oldestMessageId

        public java.lang.String oldestMessageId()
                                         throws SomException
        Get Queue Id of oldest message
        Returns:
        queueid of oldest message
        Throws:
        SomException - on error
      • outboundAssociations

        public java.lang.Integer outboundAssociations()
                                               throws SomException
        Get number of current outbound associations
        Returns:
        current number of outbound associations
        Throws:
        SomException - on error
      • protocol

        public java.lang.String protocol()
                                  throws SomException
        Get protocol id for MTA
        Returns:
        String encoding of protocol id
        Throws:
        SomException - on error
      • receivedVolume

        public java.lang.Integer receivedVolume()
                                         throws SomException
        Get total volume of received messages
        Returns:
        total volume of received messages
        Throws:
        SomException - on error
      • refuseStatus

        public java.lang.String refuseStatus()
                                      throws SomException
        Get last outbound connection refusal status as x.y.z string
        Returns:
        Last connection refusal status
        Throws:
        SomException - on error
      • refuseText

        public java.lang.String refuseText()
                                    throws SomException
        Get last outbound connection refusal reason text
        Returns:
        Last connection refusal reason text
        Throws:
        SomException - on error
      • refuseTime

        public java.lang.String refuseTime()
                                    throws SomException
        Get last outbound connection refusal time
        Returns:
        Last connection refusal time (UTC Time String)
        Throws:
        SomException - on error
      • rejectTime

        public java.lang.String rejectTime()
                                    throws SomException
        Get last inbound connection reject time
        Returns:
        Last connection reject time (UTC Time String)
        Throws:
        SomException - on error
      • rejectedAssoc

        public java.lang.Integer rejectedAssoc()
                                        throws SomException
        Get number of rejected inbound connections
        Returns:
        Total number of rejected inbound connections
        Throws:
        SomException - on error
      • rejectedMessage

        public java.lang.Integer rejectedMessage()
                                          throws SomException
        Get number of rejected inbound messages
        Returns:
        Total number of rejected inbound messages
        Throws:
        SomException - on error
      • rejectStatus

        public java.lang.Integer rejectStatus()
                                       throws SomException
        Get last inbound connection rejection status as x.y.z string
        Returns:
        Last inbound connection rejection status
        Throws:
        SomException - on error
      • storedRecipients

        public java.lang.Integer storedRecipients()
                                           throws SomException
        Get the number of stored recipients
        Returns:
        Number of stored recipients
        Throws:
        SomException - on error
      • successfulConversions

        public java.lang.Integer successfulConversions()
                                                throws SomException
        Get the number of successful conversions (for a shaper channel MTA)
        Returns:
        Number of successful conversions
        Throws:
        SomException - on error
      • totalInAssoc

        public java.lang.Integer totalInAssoc()
                                       throws SomException
        Get total number of inbound associations
        Returns:
        Total number of inbound associations
        Throws:
        SomException - on error
      • totalOutAssoc

        public java.lang.Integer totalOutAssoc()
                                        throws SomException
        Get total number of outbound associations
        Returns:
        Total number of outbound associations
        Throws:
        SomException - on error
      • diverted

        public java.lang.Boolean diverted()
                                   throws SomException
        Whether MTA has the 'divert' flag set or not
        Returns:
        Diverted or not
        Throws:
        SomException - on error
      • transmittedVolume

        public java.lang.Integer transmittedVolume()
                                            throws SomException
        Get total volume of transmitted messages
        Returns:
        Total volume of transmitted messages (bytes)
        Throws:
        SomException - on error
      • deleteMessages

        public void deleteMessages​(SomCommandListener listener)
                            throws SomException
        Delete all the messages on this MTA
        Parameters:
        listener - Listener object which will be notified when complete which may be null
        Throws:
        SomException - on error
      • nondeliverMessages

        public void nondeliverMessages​(java.lang.String reason,
                                       SomCommandListener listener)
                                throws SomException
        Nondeliver all the messages on this MTA
        Parameters:
        reason - String reason text which may not be null
        listener - Listener object which will be notified when complete which may be null
        Throws:
        SomException - on error
      • timeoutMessages

        public void timeoutMessages​(SomCommandListener listener)
                             throws SomException
        Time out all the messages on this MTA
        Parameters:
        listener - Listener object which will be notified when complete which may be null
        Throws:
        SomException - on error