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.String
buildInfoString()
Build information string for this messagevoid
handleBindResponse(int status, java.lang.String detail)
Handle the response to a Bind operationvoid
handleResponse(SomCommand obj, int status, SomMessage msg)
Handles the response to commands which return a SomMessage object (i.e.void
handleResponse(SomCommand command, int status, SomQmgrChannel object)
Handles the response to commands which return a list of channel objectsvoid
handleResponse(SomCommand command, int status, SomQmgrMessage object)
Handles the response to commands which return a list of message objectsvoid
handleResponse(SomCommand command, int status, SomQmgrMta object)
Handles the response to commands which return a list of MTA objectsvoid
handleResponse(SomCommand command, int status, SomQmgrQueueManager object)
void
handleResponse(SomCommand command, int status, java.lang.String detail)
Handles the response to control commands which return an OK/error response plus an info stringvoid
handleResponse(SomCommand command, int status, java.lang.String[] pairs)
Handles the response to commands which return data about the current object - i.e.java.lang.Integer
inboundSize()
Get size of inbound messagejava.lang.String
inMsgid()
Get message id for inbound messagejava.lang.String
mta()
Get MTA name for this inbound messagejava.lang.Integer
receivedBytes()
Get number of bytes of message received so farvoid
refresh(SomCommandListener listener)
Refresh the status of this inbound messagejava.lang.Integer
retransmissions()
Get number of retransmissions of the messagejava.lang.String
startTime()
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 SomException
Get size of inbound message- Returns:
- inbound message size
- Throws:
SomException
- if attribute is not found
-
inMsgid
public java.lang.String inMsgid() throws SomException
Get message id for inbound message- Returns:
- inbound message id
- Throws:
SomException
- if attribute is not found
-
receivedBytes
public java.lang.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 java.lang.Integer retransmissions() throws SomException
Get number of retransmissions of the message- Returns:
- number of retransmissions
- Throws:
SomException
- if attribute is not found
-
startTime
public java.lang.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, 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 interfaceSomHandler
- Specified by:
handleResponse
in 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:SomQmgrHandler
Handles the response to commands which return a list of channel objects- Specified by:
handleResponse
in 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:SomQmgrHandler
Handles the response to commands which return a list of MTA objects- Specified by:
handleResponse
in 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:SomQmgrHandler
Handles the response to commands which return a SomMessage object (i.e. read from the Queue or Archive).- Specified by:
handleResponse
in 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:SomQmgrHandler
Handles the response to commands which return a list of message objects- Specified by:
handleResponse
in 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:SomHandler
Handle the response to a Bind operation- Specified by:
handleBindResponse
in 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: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 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
-
-