Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.messaging.common
Class MessageInfo

java.lang.Object
  |
  +--oracle.panama.messaging.common.MessageInfo
All Implemented Interfaces:
java.io.Serializable

public class MessageInfo
extends java.lang.Object
implements java.io.Serializable

The message info contains all recipent specific information about the message. All of these properties are optional with default values set by the constructor.

Author:
jxiang
See Also:
Serialized Form

Field Summary
static int HIGH
           
static int HIGHEST
          Some convenient constants for the value for priority.
static int LOOSE_FULL_TRACK
           
static int LOOSE_NOTIFICATION
           
static int LOOSE_SESSION
           
static int LOW
           
static int LOWEST
           
static int NO_SESSION
          Valid value for session levels.
static int NO_TRACK
          Valid values for tracking level.
static int NORMAL
           
static int NOT_RELIABLE
          Valid reliability levels.
static int RELIABLE
           
static int TIGHT_FULL_TRACK
           
static int TIGHT_NOTIFICATION
           
static int TIGHT_SESSION
           

 

Constructor Summary
MessageInfo()
          Constructor.

 

Method Summary
 int getCostLevel()
          Get the sending cost level of the message.
 int getDelay()
          Get the delay to send the message.
 int getExpiration()
          Get the expiration of the message.
 int getPriority()
          Get the priority of the message.
 int getReliability()
          Get the reliability level of the message.
 int getSession()
          Get the session level.
 int getSpeedLevel()
          Get the sending speed level of the message.
 int getTracking()
          Get the tracking level in sending the message.
 void setCostLevel(int cost)
          Set the sending cost level of the message.
 void setDelay(int delay)
          Set the delay to send the message.
 void setExpiration(int expiration)
          Set the expiration of the message.
 void setPriority(int priority)
          Set the priority of the message.
 void setReliability(int reliable)
          Set the reliability level of the message.
 void setSession(int session)
          Set the session level.
 void setSpeedLevel(int speed)
          Set the sending speed level of the message.
 void setTracking(int tracking)
          Set the tracking level in sending the message.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

HIGHEST

public static final int HIGHEST
Some convenient constants for the value for priority.
See Also:
Constant Field Values

HIGH

public static final int HIGH
See Also:
Constant Field Values

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

LOW

public static final int LOW
See Also:
Constant Field Values

LOWEST

public static final int LOWEST
See Also:
Constant Field Values

NOT_RELIABLE

public static final int NOT_RELIABLE
Valid reliability levels. Any other value is considered the same as RELIABLE In case of failure of delivery, messages marked RELIABLE will be retried a configurable number of times before giving up.
See Also:
Constant Field Values

RELIABLE

public static final int RELIABLE
See Also:
Constant Field Values

NO_TRACK

public static final int NO_TRACK
Valid values for tracking level. Any other value is considered the same as TIGHT_NOTIFICATION. Depending on protocol, several status reports maybe available for each message. For example in SMS, status on the message reaching the SMSC, the message reaching the handset, the message being read could all potentially generate status report depending on the telco. The kind of message status reported by the transport system is based on the level tracking requested. A status report might be sent to the same messenger instance that issued the message, or another instance that has the same messenger name, depending on the tracking level set.
See Also:
Constant Field Values

TIGHT_NOTIFICATION

public static final int TIGHT_NOTIFICATION
See Also:
Constant Field Values

TIGHT_FULL_TRACK

public static final int TIGHT_FULL_TRACK
See Also:
Constant Field Values

LOOSE_NOTIFICATION

public static final int LOOSE_NOTIFICATION
See Also:
Constant Field Values

LOOSE_FULL_TRACK

public static final int LOOSE_FULL_TRACK
See Also:
Constant Field Values

NO_SESSION

public static final int NO_SESSION
Valid value for session levels. All other value is considered the same as TIGHT_SESSION. In sending a message, if you want the reply comes to the same application instance, or one application instance of the same name, you should specify the session. Tight session means the reply should come to the same application instance. Loose session doesn't require the same the instance, any instance of the application of the same name might be chosen to receive the reply. Note: LOOSE_SESSION is not yet supported.
See Also:
Constant Field Values

TIGHT_SESSION

public static final int TIGHT_SESSION
See Also:
Constant Field Values

LOOSE_SESSION

public static final int LOOSE_SESSION
See Also:
Constant Field Values
Constructor Detail

MessageInfo

public MessageInfo()
Constructor. Construct a message info with Default values: no delay, never expire. no tracking, no session not reliable normal priority, speed/cost level of 5
Method Detail

getDelay

public int getDelay()
Get the delay to send the message. Delay means how long later the message should be sent out.
Returns:
the delay in seconds.

getExpiration

public int getExpiration()
Get the expiration of the message. Expiration means how long later in seconds the message should expire. If its value is negative or zero, it never expire.
Returns:
the expiration in seconds.

getPriority

public int getPriority()
Get the priority of the message. The message is saved in a queue for delivery. The queue is sorted based on time and priority. The higher the priority is, the sooner the the message will be delivered.

The priority level must be one of the four defined. If it's smaller than HIGHEST, it's the same as HIGHEST. If it's larger than LOW, it's the same as LOW.

Returns:
the priority.

getSpeedLevel

public int getSpeedLevel()
Get the sending speed level of the message. Speed level is one of those criteria used in message routing. Its value can be in [0 .. 10]. If the value is not in this range, it means the speed level is irrelevant.
Returns:
the sending speed level.

getCostLevel

public int getCostLevel()
Get the sending cost level of the message. Cost level is one of those criteria used in message routing. Its value can be in [0 .. 10]. If the value is not in this range, it means the cost level is irrelevant.
Returns:
the sending cost level.

getReliability

public int getReliability()
Get the reliability level of the message. Reliability means if the application wants the message to send to be delivered with guarantee. If not reliable, when the message is lost somehow, the service provider doesn't have to re-try.
Returns:
the reliability level.

getTracking

public int getTracking()
Get the tracking level in sending the message. Tracking level means the application may want the tracking information of the message to send. Therefore, you need to let the service provider know tracking is requested if applicable.
Returns:
the tracking level.

getSession

public int getSession()
Get the session level.
Returns:
the session level.

setDelay

public void setDelay(int delay)
Set the delay to send the message.
Parameters:
delay - the delay in seconds.

setExpiration

public void setExpiration(int expiration)
Set the expiration of the message.
Parameters:
expiration - the expiration in seconds.

setPriority

public void setPriority(int priority)
Set the priority of the message.
Parameters:
priority - the priority.

setSpeedLevel

public void setSpeedLevel(int speed)
Set the sending speed level of the message.
Parameters:
speed - the sending speed level.

setCostLevel

public void setCostLevel(int cost)
Set the sending cost level of the message.
Parameters:
cost - the sending cost level.

setReliability

public void setReliability(int reliable)
Set the reliability level of the message. See the beginning of the doc for valid values. Any other value passed in is considered the same as RELIABLE.
Parameters:
reliable - the reliability level.

setTracking

public void setTracking(int tracking)
Set the tracking level in sending the message.
Parameters:
tracking - the tracking level.

setSession

public void setSession(int session)
Set the session level.
Parameters:
session - the session level.

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.