Package com.isode.som.qmgr.objects
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
-
-
Field Summary
-
Fields inherited from class com.isode.som.qmgr.objects.SomQmgrObject
errortext, somSession
-
-
Constructor Summary
Constructors Constructor Description SomQmgrInboundMessage(SomSession session, java.lang.String cName, java.lang.String mName)Create a new SOM Inbound message objectSomQmgrInboundMessage(SomSession session, java.lang.String c, java.lang.String m, java.lang.String[] pairs)Create a new SOM Inbound message object, initializing it from the data pairs
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringbuildInfoString()Build information string for this messagevoidhandleBindResponse(int status, java.lang.String detail)Handle the response to a Bind operationvoidhandleResponse(SomCommand obj, int status, SomMessage msg)Handles the response to commands which return a SomMessage object (i.e.voidhandleResponse(SomCommand command, int status, SomQmgrChannel object)Handles the response to commands which return a list of channel objectsvoidhandleResponse(SomCommand command, int status, SomQmgrMessage object)Handles the response to commands which return a list of message objectsvoidhandleResponse(SomCommand command, int status, SomQmgrMta object)Handles the response to commands which return a list of MTA objectsvoidhandleResponse(SomCommand command, int status, SomQmgrQueueManager object)voidhandleResponse(SomCommand command, int status, java.lang.String detail)Handles the response to control commands which return an OK/error response plus an info stringvoidhandleResponse(SomCommand command, int status, java.lang.String[] pairs)Handles the response to commands which return data about the current object - i.e.java.lang.IntegerinboundSize()Get size of inbound messagejava.lang.StringinMsgid()Get message id for inbound messagejava.lang.Stringmta()Get MTA name for this inbound messagejava.lang.IntegerreceivedBytes()Get number of bytes of message received so farvoidrefresh(SomCommandListener listener)Refresh the status of this inbound messagejava.lang.Integerretransmissions()Get number of retransmissions of the messagejava.lang.StringstartTime()Get time at which transfer started-
Methods inherited from class com.isode.som.qmgr.objects.SomQmgrObject
addAttribute, addAttribute, addBindListener, clearAttributes, getBooleanAttributeValue, getDoubleAttributeValue, getIntegerAttributeValue, getSession, getStringAttributeValue, notifyBindListeners, notifyListener, notifyListeners, parsePairs, print, print_str, removeBindListener, setSkipNotifications
-
-
-
-
Constructor Detail
-
SomQmgrInboundMessage
public SomQmgrInboundMessage(SomSession session, java.lang.String cName, java.lang.String mName)
Create a new SOM Inbound message object- Parameters:
session- Session with which the object is associatedcName- inbound channel name which must not be nullmName- inbound MTA name which must not be null
-
SomQmgrInboundMessage
public SomQmgrInboundMessage(SomSession session, java.lang.String c, java.lang.String m, java.lang.String[] pairs)
Create a new SOM Inbound message object, initializing it from the data pairs- Parameters:
session- Session with which the object is associatedc- inbound channel name which must not be nullm- inbound MTA name which must not be nullpairs- attribute pairs from which to initialize object
-
-
Method Detail
-
mta
public java.lang.String mta()
Get MTA name for this inbound message- Returns:
- mta name
-
inboundSize
public java.lang.Integer inboundSize() throws SomExceptionGet size of inbound message- Returns:
- inbound message size
- Throws:
SomException- if attribute is not found
-
inMsgid
public java.lang.String inMsgid() throws SomExceptionGet message id for inbound message- Returns:
- inbound message id
- Throws:
SomException- if attribute is not found
-
receivedBytes
public java.lang.Integer receivedBytes() throws SomExceptionGet number of bytes of message received so far- Returns:
- number of bytes received so far
- Throws:
SomException- if attribute is not found
-
retransmissions
public java.lang.Integer retransmissions() throws SomExceptionGet number of retransmissions of the message- Returns:
- number of retransmissions
- Throws:
SomException- if attribute is not found
-
startTime
public java.lang.String startTime() throws SomExceptionGet 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, java.lang.String detail)
Description copied from interface:SomQmgrHandlerHandles the response to control commands which return an OK/error response plus an info string- Specified by:
handleResponsein interfaceSomHandler- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statusdetail- 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:SomQmgrHandlerHandles the response to commands which return a list of channel objects- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statusobject- a channel object
-
handleResponse
public void handleResponse(SomCommand command, int status, SomQmgrMta object)
Description copied from interface:SomQmgrHandlerHandles the response to commands which return a list of MTA objects- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statusobject- a SOM Qmgr MTA object
-
handleResponse
public void handleResponse(SomCommand obj, int status, SomMessage msg)
Description copied from interface:SomQmgrHandlerHandles the response to commands which return a SomMessage object (i.e. read from the Queue or Archive).- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
obj- the SOM commandstatus- operation statusmsg- a message object
-
handleResponse
public void handleResponse(SomCommand command, int status, SomQmgrMessage object)
Description copied from interface:SomQmgrHandlerHandles the response to commands which return a list of message objects- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statusobject- a qmgr message object
-
handleBindResponse
public void handleBindResponse(int status, java.lang.String detail)Description copied from interface:SomHandlerHandle the response to a Bind operation- Specified by:
handleBindResponsein interfaceSomHandler- Parameters:
status- operation statusdetail- error detail on failure
-
handleResponse
public void handleResponse(SomCommand command, int status, java.lang.String[] pairs)
Description copied from interface:SomQmgrHandlerHandles the response to commands which return data about the current object - i.e. we are refreshing an existing object.- Specified by:
handleResponsein interfaceSomQmgrHandler- Parameters:
command- the SOM commandstatus- operation statuspairs- 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 java.lang.String buildInfoString()
Build information string for this message- Returns:
- Info string
-
-