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 classSomQmgrRecipient.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.StringbuildInfoString()Generate information string about this recipientjava.lang.StringcachedUntil()Get the time which this message is delayed untiljava.lang.Stringchannel()Get current channel namejava.lang.Stringchannels()Get the list of channels which this recipient address is scheduled onjava.lang.StringchannelsDone()Get a list of channels which have already processed this recipient addressvoidclear(SomCommandListener listener)Clear delay on this recipientjava.lang.StringcontentId()Get content id for recipientvoiddelay(int mins, SomCommandListener listener)Delay this recipientvoiddelete(SomCommandListener listener)Delete this recipientjava.lang.Stringenabled()Get a string indicating whether this recipient is enabled or notjava.lang.IntegergetCV()SomQmgrMessagegetMsg()java.lang.Stringgroup()Get internal group namejava.lang.Stringinfo()Get information string for recipientjava.lang.StringlastAttempt()Get time of last processing attemptjava.lang.StringlastSuccess()Get time of last successful processing attemptjava.lang.StringmsgState()Get state of this recipientSomQmgrRecipient.MessageStatemsgStateCode()Get state codejava.lang.StringmsgStatus()Get recipient statusjava.lang.StringmsgStatusCode()Get recipient status string as x.y.zjava.lang.Stringmta()Get MTA name for this recipientvoidnondeliver(java.lang.String reason, SomCommandListener listener)Nondeliver this recipientjava.lang.IntegeroutboundSize()Get size of outbound message for this recipientjava.lang.IntegerreceivedBytes()Get number of bytes that receiving MTA has acknowledgedjava.lang.Integerrecipient()Get recipient numbervoidredirect(java.lang.String addr, SomCommandListener listener)Redirect this recipient to a new addressjava.lang.Integerretransmissions()Get number of retransmissions that have been necessaryvoidtimeout(SomCommandListener listener)Time out this recipientjava.lang.IntegertransmittedBytes()Get number of bytes transmittedjava.lang.Stringuser()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 SomExceptionGet 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 SomExceptionGet 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 SomExceptionGet 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 SomExceptionGet 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 SomExceptionGet information string for recipient- Returns:
- information string
- Throws:
SomException- on error
-
lastAttempt
public java.lang.String lastAttempt() throws SomExceptionGet time of last processing attempt- Returns:
- time of last attempt (UTC time string)
- Throws:
SomException- on error
-
lastSuccess
public java.lang.String lastSuccess() throws SomExceptionGet 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 SomExceptionGet recipient status- Returns:
- recipient status
- Throws:
SomException- on error
-
mta
public java.lang.String mta() throws SomExceptionGet MTA name for this recipient- Returns:
- mta name
- Throws:
SomException- on error
-
user
public java.lang.String user() throws SomExceptionGet actual address- Returns:
- recipient address (string encoding)
- Throws:
SomException- on error
-
recipient
public java.lang.Integer recipient() throws SomExceptionGet recipient number- Returns:
- recipient number
- Throws:
SomException- on error
-
channel
public java.lang.String channel() throws SomExceptionGet current channel name- Returns:
- channel name
- Throws:
SomException- on error
-
contentId
public java.lang.String contentId() throws SomExceptionGet content id for recipient- Returns:
- content-id
- Throws:
SomException- on error
-
group
public java.lang.String group() throws SomExceptionGet internal group name- Returns:
- group name
- Throws:
SomException- on error
-
msgState
public java.lang.String msgState() throws SomExceptionGet 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 SomExceptionGet recipient status string as x.y.z- Returns:
- status string
- Throws:
SomException- on error
-
outboundSize
public java.lang.Integer outboundSize() throws SomExceptionGet size of outbound message for this recipient- Returns:
- size of outbound message
- Throws:
SomException- on error
-
receivedBytes
public java.lang.Integer receivedBytes() throws SomExceptionGet number of bytes that receiving MTA has acknowledged- Returns:
- number of bytes received
- Throws:
SomException- on error
-
retransmissions
public java.lang.Integer retransmissions() throws SomExceptionGet number of retransmissions that have been necessary- Returns:
- number of retransmissions
- Throws:
SomException- on error
-
transmittedBytes
public java.lang.Integer transmittedBytes() throws SomExceptionGet 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 SomExceptionDelay 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 SomExceptionRedirect 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 SomExceptionNondeliver 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
-
-