Class SomQmgrInboundMessage

java.lang.Object
com.isode.som.qmgr.objects.SomQmgrObject
com.isode.som.qmgr.objects.SomQmgrInboundMessage
All Implemented Interfaces:
SomQmgrHandler, SomHandler

public class SomQmgrInboundMessage extends SomQmgrObject implements SomQmgrHandler
This class models a message which is inbound to M-Switch.
Author:
tc
  • Constructor Details

    • SomQmgrInboundMessage

      public SomQmgrInboundMessage(SomSession session, String cName, String mName)
      Create a new SOM Inbound message object
      Parameters:
      session - Session with which the object is associated
      cName - inbound channel name which must not be null
      mName - inbound MTA name which must not be null
    • SomQmgrInboundMessage

      public SomQmgrInboundMessage(SomSession session, String c, String m, String[] pairs)
      Create a new SOM Inbound message object, initializing it from the data pairs
      Parameters:
      session - Session with which the object is associated
      c - inbound channel name which must not be null
      m - inbound MTA name which must not be null
      pairs - attribute pairs from which to initialize object
  • Method Details

    • mta

      public String mta()
      Get MTA name for this inbound message
      Returns:
      mta name
    • inboundSize

      public Integer inboundSize() throws SomException
      Get size of inbound message
      Returns:
      inbound message size
      Throws:
      SomException - if attribute is not found
    • inMsgid

      public String inMsgid() throws SomException
      Get message id for inbound message
      Returns:
      inbound message id
      Throws:
      SomException - if attribute is not found
    • receivedBytes

      public Integer receivedBytes() throws SomException
      Get number of bytes of message received so far
      Returns:
      number of bytes received so far
      Throws:
      SomException - if attribute is not found
    • retransmissions

      public Integer retransmissions() throws SomException
      Get number of retransmissions of the message
      Returns:
      number of retransmissions
      Throws:
      SomException - if attribute is not found
    • startTime

      public String startTime() throws SomException
      Get time at which transfer started
      Returns:
      start time of transfer
      Throws:
      SomException - if attribute is not found
    • handleResponse

      public void handleResponse(SomCommand command, int status, 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, SomQmgrQueueManager 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 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 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
    • 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
    • handleBindResponse

      public void handleBindResponse(int status, 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, 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
    • refresh

      public void refresh(SomCommandListener listener) throws SomException
      Refresh the status of this inbound message
      Parameters:
      listener - Listener object to notify when complete which may be null
      Throws:
      SomException - on error
    • buildInfoString

      public String buildInfoString()
      Build information string for this message
      Returns:
      Info string