Package com.isode.som.qmgr.objects
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SomQmgrRecipient.MessageState
-
Field Summary
-
Fields inherited from class com.isode.som.qmgr.objects.SomQmgrObject
errortext, somSession
-
-
Constructor Summary
Constructors Constructor Description SomQmgrRecipient(SomSession session, java.lang.String c, java.lang.String m, SomQmgrMessage msg)
Create a new recipient objectSomQmgrRecipient(SomSession session, java.lang.String c, java.lang.String m, SomQmgrMessage msg, java.lang.String[] pairs)
Create a new recipient object, populating it from the attribute pairs passed in
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
buildInfoString()
Generate information string about this recipientjava.lang.String
cachedUntil()
Get the time which this message is delayed untiljava.lang.String
channel()
Get current channel namejava.lang.String
channels()
Get the list of channels which this recipient address is scheduled onjava.lang.String
channelsDone()
Get a list of channels which have already processed this recipient addressvoid
clear(SomCommandListener listener)
Clear delay on this recipientjava.lang.String
contentId()
Get content id for recipientvoid
delay(int mins, SomCommandListener listener)
Delay this recipientvoid
delete(SomCommandListener listener)
Delete this recipientjava.lang.String
enabled()
Get a string indicating whether this recipient is enabled or notjava.lang.Integer
getCV()
SomQmgrMessage
getMsg()
java.lang.String
group()
Get internal group namejava.lang.String
info()
Get information string for recipientjava.lang.String
lastAttempt()
Get time of last processing attemptjava.lang.String
lastSuccess()
Get time of last successful processing attemptjava.lang.String
msgState()
Get state of this recipientSomQmgrRecipient.MessageState
msgStateCode()
Get state codejava.lang.String
msgStatus()
Get recipient statusjava.lang.String
msgStatusCode()
Get recipient status string as x.y.zjava.lang.String
mta()
Get MTA name for this recipientvoid
nondeliver(java.lang.String reason, SomCommandListener listener)
Nondeliver this recipientjava.lang.Integer
outboundSize()
Get size of outbound message for this recipientjava.lang.Integer
receivedBytes()
Get number of bytes that receiving MTA has acknowledgedjava.lang.Integer
recipient()
Get recipient numbervoid
redirect(java.lang.String addr, SomCommandListener listener)
Redirect this recipient to a new addressjava.lang.Integer
retransmissions()
Get number of retransmissions that have been necessaryvoid
timeout(SomCommandListener listener)
Time out this recipientjava.lang.Integer
transmittedBytes()
Get number of bytes transmittedjava.lang.String
user()
Get actual address-
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
-
SomQmgrRecipient
public SomQmgrRecipient(SomSession session, java.lang.String c, java.lang.String m, SomQmgrMessage msg)
Create a new recipient object- Parameters:
session
- session for this recipient which must not be nullc
- channel for this recipient which must not be nullm
- mta for this recipient which may be nullmsg
- message for this recipient which may not be null
-
SomQmgrRecipient
public SomQmgrRecipient(SomSession session, java.lang.String c, java.lang.String m, SomQmgrMessage msg, java.lang.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 nullc
- channel for this recipient which must not be nullm
- mta for this recipient which may be nullmsg
- message for this recipient which may not be nullpairs
- attribute pairs
-
-
Method Detail
-
cachedUntil
public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String info() throws SomException
Get information string for recipient- Returns:
- information string
- Throws:
SomException
- on error
-
lastAttempt
public java.lang.String lastAttempt() throws SomException
Get time of last processing attempt- Returns:
- time of last attempt (UTC time string)
- Throws:
SomException
- on error
-
lastSuccess
public java.lang.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 java.lang.String msgStatus() throws SomException
Get recipient status- Returns:
- recipient status
- Throws:
SomException
- on error
-
mta
public java.lang.String mta() throws SomException
Get MTA name for this recipient- Returns:
- mta name
- Throws:
SomException
- on error
-
user
public java.lang.String user() throws SomException
Get actual address- Returns:
- recipient address (string encoding)
- Throws:
SomException
- on error
-
recipient
public java.lang.Integer recipient() throws SomException
Get recipient number- Returns:
- recipient number
- Throws:
SomException
- on error
-
channel
public java.lang.String channel() throws SomException
Get current channel name- Returns:
- channel name
- Throws:
SomException
- on error
-
contentId
public java.lang.String contentId() throws SomException
Get content id for recipient- Returns:
- content-id
- Throws:
SomException
- on error
-
group
public java.lang.String group() throws SomException
Get internal group name- Returns:
- group name
- Throws:
SomException
- on error
-
msgState
public java.lang.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 java.lang.String msgStatusCode() throws SomException
Get recipient status string as x.y.z- Returns:
- status string
- Throws:
SomException
- on error
-
outboundSize
public java.lang.Integer outboundSize() throws SomException
Get size of outbound message for this recipient- Returns:
- size of outbound message
- Throws:
SomException
- on error
-
receivedBytes
public java.lang.Integer receivedBytes() throws SomException
Get number of bytes that receiving MTA has acknowledged- Returns:
- number of bytes received
- Throws:
SomException
- on error
-
retransmissions
public java.lang.Integer retransmissions() throws SomException
Get number of retransmissions that have been necessary- Returns:
- number of retransmissions
- Throws:
SomException
- on error
-
transmittedBytes
public java.lang.Integer transmittedBytes() throws SomException
Get number of bytes transmitted- Returns:
- number of bytes transmitted
- Throws:
SomException
- on error
-
buildInfoString
public java.lang.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 bylistener
- 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(java.lang.String addr, SomCommandListener listener) throws SomException
Redirect this recipient to a new address- Parameters:
addr
- new recipient addresslistener
- Object to notify when operation complete, which may be null- Throws:
SomException
- on error
-
nondeliver
public void nondeliver(java.lang.String reason, SomCommandListener listener) throws SomException
Nondeliver this recipient- Parameters:
reason
- reason text which must not be nulllistener
- 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 java.lang.Integer getCV() throws SomException
- Throws:
SomException
-
-