Class SomQmgrRecipient


  • public class SomQmgrRecipient
    extends SomQmgrObject
    Class which models a recipient object within the Queue
    Author:
    tc
    • Constructor Detail

      • SomQmgrRecipient

        public SomQmgrRecipient​(SomSession session,
                                java.lang.String c,
                                java.lang.String m,
                                SomQmgrMessage msg)
        Create a new recipient object
        Parameters:
        session - session for this recipient which must not be null
        c - channel for this recipient which must not be null
        m - mta for this recipient which may be null
        msg - message for this recipient which may not be null
      • SomQmgrRecipient

        public SomQmgrRecipient​(SomSession session,
                                java.lang.String c,
                                java.lang.String m,
                                SomQmgrMessage msg,
                                java.lang.String[] pairs)
        Create a new recipient object, populating it from the attribute pairs passed in
        Parameters:
        session - session for this recipient which must not be null
        c - channel for this recipient which must not be null
        m - mta for this recipient which may be null
        msg - message for this recipient which may not be null
        pairs - attribute pairs
    • Method Detail

      • cachedUntil

        public java.lang.String cachedUntil()
                                     throws SomException
        Get the time which this message is delayed until
        Returns:
        delay time (UTC Time string)
        Throws:
        SomException - on error
      • channels

        public java.lang.String channels()
                                  throws SomException
        Get the list of channels which this recipient address is scheduled on
        Returns:
        string containing list of channels
        Throws:
        SomException - on error
      • channelsDone

        public java.lang.String channelsDone()
                                      throws SomException
        Get a list of channels which have already processed this recipient address
        Returns:
        list of channels
        Throws:
        SomException - on error
      • enabled

        public java.lang.String enabled()
                                 throws SomException
        Get a string indicating whether this recipient is enabled or not
        Returns:
        "True" if recipient enabled, "False" otherwise
        Throws:
        SomException - on error
      • info

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

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

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

        public java.lang.String msgStatus()
                                   throws SomException
        Get recipient status
        Returns:
        recipient status
        Throws:
        SomException - on error
      • mta

        public java.lang.String mta()
                             throws SomException
        Get MTA name for this recipient
        Returns:
        mta name
        Throws:
        SomException - on error
      • user

        public java.lang.String user()
                              throws SomException
        Get actual address
        Returns:
        recipient address (string encoding)
        Throws:
        SomException - on error
      • recipient

        public java.lang.Integer recipient()
                                    throws SomException
        Get recipient number
        Returns:
        recipient number
        Throws:
        SomException - on error
      • channel

        public java.lang.String channel()
                                 throws SomException
        Get current channel name
        Returns:
        channel name
        Throws:
        SomException - on error
      • contentId

        public java.lang.String contentId()
                                   throws SomException
        Get content id for recipient
        Returns:
        content-id
        Throws:
        SomException - on error
      • group

        public java.lang.String group()
                               throws SomException
        Get internal group name
        Returns:
        group name
        Throws:
        SomException - on error
      • msgState

        public java.lang.String msgState()
                                  throws SomException
        Get state of this recipient
        Returns:
        state string
        Throws:
        SomException - on error
      • msgStatusCode

        public java.lang.String msgStatusCode()
                                       throws SomException
        Get recipient status string as x.y.z
        Returns:
        status string
        Throws:
        SomException - on error
      • outboundSize

        public java.lang.Integer outboundSize()
                                       throws SomException
        Get size of outbound message for this recipient
        Returns:
        size of outbound message
        Throws:
        SomException - on error
      • receivedBytes

        public java.lang.Integer receivedBytes()
                                        throws SomException
        Get number of bytes that receiving MTA has acknowledged
        Returns:
        number of bytes received
        Throws:
        SomException - on error
      • retransmissions

        public java.lang.Integer retransmissions()
                                          throws SomException
        Get number of retransmissions that have been necessary
        Returns:
        number of retransmissions
        Throws:
        SomException - on error
      • transmittedBytes

        public java.lang.Integer transmittedBytes()
                                           throws SomException
        Get number of bytes transmitted
        Returns:
        number of bytes transmitted
        Throws:
        SomException - on error
      • buildInfoString

        public java.lang.String buildInfoString()
        Generate information string about this recipient
        Returns:
        info string
      • clear

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

        public void delay​(int mins,
                          SomCommandListener listener)
                   throws SomException
        Delay this recipient
        Parameters:
        mins - minutes to delay recipient by
        listener - Object to notify when operation complete, which may be null
        Throws:
        SomException - on error
      • timeout

        public void timeout​(SomCommandListener listener)
                     throws SomException
        Time out this recipient
        Parameters:
        listener - Object to notify when operation complete, which may be null
        Throws:
        SomException - on error
      • delete

        public void delete​(SomCommandListener listener)
                    throws SomException
        Delete this recipient
        Parameters:
        listener - Object to notify when operation complete, which may be null
        Throws:
        SomException - on error
      • redirect

        public void redirect​(java.lang.String addr,
                             SomCommandListener listener)
                      throws SomException
        Redirect this recipient to a new address
        Parameters:
        addr - new recipient address
        listener - Object to notify when operation complete, which may be null
        Throws:
        SomException - on error
      • nondeliver

        public void nondeliver​(java.lang.String reason,
                               SomCommandListener listener)
                        throws SomException
        Nondeliver this recipient
        Parameters:
        reason - reason text which must not be null
        listener - Object to notify when operation complete, which may be null
        Throws:
        SomException - on error
      • getMsg

        public SomQmgrMessage getMsg()
        Returns:
        The SomQmgrMessage for this recipient;