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
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
ConstructorsConstructorDescriptionSomQmgrInboundMessage
(SomSession session, String cName, String mName) Create a new SOM Inbound message objectSomQmgrInboundMessage
(SomSession session, String c, String m, String[] pairs) Create a new SOM Inbound message object, initializing it from the data pairs -
Method Summary
Modifier and TypeMethodDescriptionBuild information string for this messagevoid
handleBindResponse
(int status, 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, String detail) Handles the response to control commands which return an OK/error response plus an info stringvoid
handleResponse
(SomCommand command, int status, String[] pairs) Handles the response to commands which return data about the current object - i.e.Get size of inbound messageinMsgid()
Get message id for inbound messagemta()
Get MTA name for this inbound messageGet number of bytes of message received so farvoid
refresh
(SomCommandListener listener) Refresh the status of this inbound messageGet number of retransmissions of the messageGet time at which transfer startedMethods 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 Details
-
SomQmgrInboundMessage
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
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 Details
-
mta
Get MTA name for this inbound message- Returns:
- mta name
-
inboundSize
Get size of inbound message- Returns:
- inbound message size
- Throws:
SomException
- if attribute is not found
-
inMsgid
Get message id for inbound message- Returns:
- inbound message id
- Throws:
SomException
- if attribute is not found
-
receivedBytes
Get number of bytes of message received so far- Returns:
- number of bytes received so far
- Throws:
SomException
- if attribute is not found
-
retransmissions
Get number of retransmissions of the message- Returns:
- number of retransmissions
- Throws:
SomException
- if attribute is not found
-
startTime
Get time at which transfer started- Returns:
- start time of transfer
- Throws:
SomException
- if attribute is not found
-
handleResponse
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
-
handleResponse
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
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
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
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
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
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
Refresh the status of this inbound message- Parameters:
listener
- Listener object to notify when complete which may be null- Throws:
SomException
- on error
-
buildInfoString
Build information string for this message- Returns:
- Info string
-