Class SomQmgrRecipient

java.lang.Object
com.isode.som.qmgr.objects.SomQmgrObject
com.isode.som.qmgr.objects.SomQmgrRecipient

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

    • SomQmgrRecipient

      public SomQmgrRecipient(SomSession session, String c, 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, String c, String m, SomQmgrMessage msg, 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 Details

    • cachedUntil

      public 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 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 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 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 String info() throws SomException
      Get information string for recipient
      Returns:
      information string
      Throws:
      SomException - on error
    • lastAttempt

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

      public 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 String msgStatus() throws SomException
      Get recipient status
      Returns:
      recipient status
      Throws:
      SomException - on error
    • mta

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

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

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

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

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

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

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

      public SomQmgrRecipient.MessageState msgStateCode() throws SomException
      Get state code
      Returns:
      state code
      Throws:
      SomException - on error
    • msgStatusCode

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

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

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

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

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

      public 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(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(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;
    • getCV

      public Integer getCV() throws SomException
      Throws:
      SomException