com.sun.im.service
Interface MessageProcessingRule


public interface MessageProcessingRule

This class allows the application to define rules governing how messages should be processed by the service. In the common case, messages are delivered to the recipient(s) if online and may be stored for future delivery. This class provide the user with more control over what happens. Specifically, it allows the user to define a condition based on time and message disposition and associate a specific action should this condition be matched by the message. Actions include discarding the message, deferring it, or generating some form of notification back to the sender.


Nested Class Summary
static class MessageProcessingRule.Action
          This class defines an action that the service can take on a message in transit
static class MessageProcessingRule.Condition
          base condition class
static class MessageProcessingRule.DispositionCondition
          A message disposition describes how the service plans to dispose of a message.
static class MessageProcessingRule.ExpirationCondition
          expiration condition
static class MessageProcessingRule.SessionCondition
          A recipient may access the service using multiple sessions.
 
Field Summary
static MessageProcessingRule.Action ALERT
          notifies the sender if the condition is matched The notification is provided through the MessageStatusListener object provided when sending the message
static MessageProcessingRule.SessionCondition ANY
          deliver to any of the recipients session.
static MessageProcessingRule.Action DEFER
          store the message for future delivery.
static MessageProcessingRule.DispositionCondition DIRECT
          message to be delivered directly to online user
static MessageProcessingRule.Action DROP
          discard the message silently
static MessageProcessingRule.SessionCondition EQUALS
          deliver only to session matched by the recipient address
static MessageProcessingRule.Action ERROR
          notifies the sender if the condition is matched The notification is provided through the MessageStatusListener object provided when sending the message
static MessageProcessingRule.DispositionCondition FORWARD
          message to be forwarded to another XMPP domain
static MessageProcessingRule.DispositionCondition GATEWAY
          message to be forwarded to another messaging system.
static MessageProcessingRule.DispositionCondition NONE
          message to be discarded
static MessageProcessingRule.SessionCondition NOT
          deliver to any session except for the one specified by the recipient address
static MessageProcessingRule.Action NOTIFY
          notifies the sender if the condition is matched The notification is provided through the MessageStatusListener object provided when sending the message
static MessageProcessingRule.DispositionCondition STORED
          message to be stored for future delivery
 
Method Summary
 MessageProcessingRule.Action getAction()
          get this rule's action
 MessageProcessingRule.Condition[] getConditions()
          get the condition set contained in this rule
 

Field Detail

DROP

public static final MessageProcessingRule.Action DROP
discard the message silently


NOTIFY

public static final MessageProcessingRule.Action NOTIFY
notifies the sender if the condition is matched The notification is provided through the MessageStatusListener object provided when sending the message


ALERT

public static final MessageProcessingRule.Action ALERT
notifies the sender if the condition is matched The notification is provided through the MessageStatusListener object provided when sending the message


ERROR

public static final MessageProcessingRule.Action ERROR
notifies the sender if the condition is matched The notification is provided through the MessageStatusListener object provided when sending the message


DEFER

public static final MessageProcessingRule.Action DEFER
store the message for future delivery. This action should be only in combination with a expiration-based DROP rule.


DIRECT

public static final MessageProcessingRule.DispositionCondition DIRECT
message to be delivered directly to online user


STORED

public static final MessageProcessingRule.DispositionCondition STORED
message to be stored for future delivery


FORWARD

public static final MessageProcessingRule.DispositionCondition FORWARD
message to be forwarded to another XMPP domain


GATEWAY

public static final MessageProcessingRule.DispositionCondition GATEWAY
message to be forwarded to another messaging system.


NONE

public static final MessageProcessingRule.DispositionCondition NONE
message to be discarded


ANY

public static final MessageProcessingRule.SessionCondition ANY
deliver to any of the recipients session. Note that if the destination address specifies a session, this session will be tried first.


NOT

public static final MessageProcessingRule.SessionCondition NOT
deliver to any session except for the one specified by the recipient address


EQUALS

public static final MessageProcessingRule.SessionCondition EQUALS
deliver only to session matched by the recipient address

Method Detail

getConditions

public MessageProcessingRule.Condition[] getConditions()
                                                throws java.lang.IllegalArgumentException
get the condition set contained in this rule

Returns:
array of Condition objects
Throws:
java.lang.IllegalArgumentException

getAction

public MessageProcessingRule.Action getAction()
get this rule's action

Returns:
action for this rule.