Package com.isode.som.qmgr
Class SomQmgrMessageControlCommand
java.lang.Object
com.isode.som.SomCommand
com.isode.som.qmgr.SomQmgrCommand
com.isode.som.qmgr.SomQmgrMessageControlCommand
- All Implemented Interfaces:
SomResponseProcessor
SOM Command which enables Control operations to be performed on Messages.
Commands are:
SOM_MESSAGE_STOP
SOM_MESSAGE_START
SOM_MESSAGE_DELAY_CLEAR
SOM_MESSAGE_DELAY_SET
SOM_MESSAGE_DELETE
SOM_MESSAGE_NONDELIVER
SOM_MESSAGE_REPROCESS
SOM_MESSAGE_TIMEOUT
SOM_MESSAGE_REDIRECT
SOM_MESSAGE_RELOAD
SOM_MESSAGE_ABORT
SOM_MESSAGE_PAUSE
SOM_MESSAGE_RESUME
- Author:
- tc
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.isode.som.SomCommand
opListener, opSession -
Constructor Summary
ConstructorsConstructorDescriptionSomQmgrMessageControlCommand(SomSession session, int op, String chan, String mta, SomQmgrHandler object, SomCommandListener listener) Create a new SomQmgrMessageControlCommand objectSomQmgrMessageControlCommand(SomSession session, int op, String chan, String mta, SomQmgrSelector sel, SomQmgrHandler object, SomCommandListener listener) Create a new SomQMgrMessageControlCommand object -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a selector into a command objectReturn string representation of commandvoidSet a delay time for a messagevoidSet the value to be used if forcing a message to have a certain priority.voidSet a reason string to be used when non-delivering a messagevoidsetRecipient(String recip) Set the new recipient for message redirectionMethods inherited from class com.isode.som.qmgr.SomQmgrCommand
getHandler, processResponseMethods inherited from class com.isode.som.SomCommand
dispatch, getSession, notifyListener, notifyListener, notifyListener
-
Field Details
-
SOM_MESSAGE_STOP
public static final int SOM_MESSAGE_STOP- See Also:
-
SOM_MESSAGE_START
public static final int SOM_MESSAGE_START- See Also:
-
SOM_MESSAGE_DELAY_CLEAR
public static final int SOM_MESSAGE_DELAY_CLEAR- See Also:
-
SOM_MESSAGE_DELAY_SET
public static final int SOM_MESSAGE_DELAY_SET- See Also:
-
SOM_MESSAGE_DELETE
public static final int SOM_MESSAGE_DELETE- See Also:
-
SOM_MESSAGE_NONDELIVER
public static final int SOM_MESSAGE_NONDELIVER- See Also:
-
SOM_MESSAGE_REPROCESS
public static final int SOM_MESSAGE_REPROCESS- See Also:
-
SOM_MESSAGE_TIMEOUT
public static final int SOM_MESSAGE_TIMEOUT- See Also:
-
SOM_MESSAGE_REDIRECT
public static final int SOM_MESSAGE_REDIRECT- See Also:
-
SOM_MESSAGE_RELOAD
public static final int SOM_MESSAGE_RELOAD- See Also:
-
SOM_MESSAGE_ABORT
public static final int SOM_MESSAGE_ABORT- See Also:
-
SOM_MESSAGE_PAUSE
public static final int SOM_MESSAGE_PAUSE- See Also:
-
SOM_MESSAGE_RESUME
public static final int SOM_MESSAGE_RESUME- See Also:
-
SOM_MESSAGE_FORCE
public static final int SOM_MESSAGE_FORCE- See Also:
-
-
Constructor Details
-
SomQmgrMessageControlCommand
public SomQmgrMessageControlCommand(SomSession session, int op, String chan, String mta, SomQmgrHandler object, SomCommandListener listener) Create a new SomQmgrMessageControlCommand object- Parameters:
session- Session in which to construct commandop- Operation codechan- Channel name for command which may not be nullmta- MTA name for command which may not be nullobject- Result handler for command which may not be nulllistener- Listener object to be notified when command completes which may be null
-
SomQmgrMessageControlCommand
public SomQmgrMessageControlCommand(SomSession session, int op, String chan, String mta, SomQmgrSelector sel, SomQmgrHandler object, SomCommandListener listener) Create a new SomQMgrMessageControlCommand object- Parameters:
session- Session in which to construct commandop- Operation codechan- Channel name for command which may not be nullmta- MTA name for command which may not be nullsel- Selector object which may be nullobject- Result handler for command which may not be nulllistener- Listener object to be notified when command completes which may be null
-
-
Method Details
-
setReason
Set a reason string to be used when non-delivering a message- Parameters:
r- Reason string
-
setDelay
Set a delay time for a message- Parameters:
d- Time to delay message until (UTC Time String)
-
setRecipient
Set the new recipient for message redirection- Parameters:
recip- Recipient address to which message should be redirected
-
setForce
Set the value to be used if forcing a message to have a certain priority.- Parameters:
forceValue- the forced priority value to use
-
getSubcommand
- Throws:
SomException
-
addSelector
Add a selector into a command object- Parameters:
sel- Selector to add
-
getCommandString
Return string representation of command- Overrides:
getCommandStringin classSomCommand- Returns:
- Command string
- Throws:
SomException- on error
-