Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.messaging.common
Class MessageInfo

java.lang.Object
  extended byoracle.panama.messaging.common.MessageInfo

All Implemented Interfaces:
java.io.Serializable

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

This class contains all recipient specific information about the message. All of these properties are optional with default values set by the constructor.

See Also:
Serialized Form

Field Summary
static int HIGH
Defines high level for message priority.
static int HIGHEST
Defines highest level message priority.
static int LOOSE_FULL_TRACK
Defines a valid value for tracking level.
static int LOOSE_NOTIFICATION
Defines a valid value for tracking level.
static int LOOSE_SESSION
Defines a valid setting for session level, means loose session required.
static int LOW
Defines low level for message priority.
static int LOWEST
Defines lowest level for message priority.
static int NO_SESSION
Defines a valid setting for session level, means no session is required.
static int NO_TRACK
Defines a valid value for tracking level.
static int NORMAL
Defines normal level for message priority.
static int NOT_RELIABLE
Defines non reliable reliability levels.
static int RELIABLE
Defines reliable reliability levels.
static int TIGHT_FULL_TRACK
Defines a valid value for tracking level.
static int TIGHT_NOTIFICATION
Defines a valid value for tracking level.
static int TIGHT_SESSION
Defines a valid setting for session level, means tight session required.

Constructor Summary
MessageInfo()
Constructor, Construct a message info with Default values.

Method Summary
boolean equals(java.lang.Object other)
Checks for the equality of two MessageInfo Objects.
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.
int hashCode()
Generates and returns the hashcode for the instance.
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)
Sets 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
getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

HIGH

public static final int HIGH
Defines high level for message priority.
See Also:
Constant Field Values

HIGHEST

public static final int HIGHEST
Defines highest level message priority.
See Also:
Constant Field Values

LOOSE_FULL_TRACK

public static final int LOOSE_FULL_TRACK
Defines a valid value for tracking level. Means full message tracking is required and the tracking notification need not necessarily come to the same instance that sent the message.
See Also:
Constant Field Values

LOOSE_NOTIFICATION

public static final int LOOSE_NOTIFICATION
Defines a valid value for tracking level. Means tracking notification not necessarily come to the same instance that sent the message.
See Also:
Constant Field Values

LOOSE_SESSION

public static final int LOOSE_SESSION
Defines a valid setting for session level, means loose session required. Loose session means that the reply can come from any instance of the application with the same name. Note: Loose session is not supported yet.
See Also:
Constant Field Values

LOW

public static final int LOW
Defines low level for message priority.
See Also:
Constant Field Values

LOWEST

public static final int LOWEST
Defines lowest level for message priority.
See Also:
Constant Field Values

NO_SESSION

public static final int NO_SESSION
Defines a valid setting for session level, means no session is required.
See Also:
Constant Field Values

NO_TRACK

public static final int NO_TRACK
Defines a valid value for tracking level. Means message tracking not requried.
See Also:
Constant Field Values

NORMAL

public static final int NORMAL
Defines normal level for message priority.
See Also:
Constant Field Values

NOT_RELIABLE

public static final int NOT_RELIABLE
Defines non reliable reliability levels.
See Also:
Constant Field Values

RELIABLE

public static final int RELIABLE
Defines reliable reliability levels. 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

TIGHT_FULL_TRACK

public static final int TIGHT_FULL_TRACK
Defines a valid value for tracking level. Means full message tracking is required and the tracking notification must come to the same instance that sent the message.
See Also:
Constant Field Values

TIGHT_NOTIFICATION

public static final int TIGHT_NOTIFICATION
Defines a valid value for tracking level. Means tracking notification must come to the same instance that sent the message.
See Also:
Constant Field Values

TIGHT_SESSION

public static final int TIGHT_SESSION
Defines a valid setting for session level, means tight session required. Tight session means that the reply should come to the same application instance which sent the message.
See Also:
Constant Field Values

Constructor Detail

MessageInfo

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

Method Detail

equals

public boolean equals(java.lang.Object other)
Checks for the equality of two MessageInfo Objects.
Parameters:
other - MessageInfo object that needs to be compared with this instance.
Returns:
true if the two instances are equal, otherwise returns false.

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.

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 the priority is less that 0(Value set for HIGHEST) then the priority is set to HIGHEST. And if the priority is greater than 4(VALUE set for LOWEST) then the priority is set to LOWEST.

Returns:
the priority.

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.

getSession

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

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.

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.

hashCode

public int hashCode()
Generates and returns the hashcode for the instance.
Returns:
the hash code.

setCostLevel

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

setDelay

public void setDelay(int delay)
Set the delay to send the message. Delay means how long later the message should be sent out.
Parameters:
delay - the delay in seconds.

setExpiration

public void setExpiration(int expiration)
Set 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.
Parameters:
expiration - the expiration in seconds.

setPriority

public void setPriority(int priority)
Set 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 the priority is less that 0(Value set for HIGHEST) then the priority is set to HIGHEST. And if the priority is greater than 4(VALUE set for LOWEST) then the priority is set to LOWEST.

Parameters:
priority - the priority.

setReliability

public void setReliability(int reliable)
Set the reliability level of the message. Valid values defined by the fields NOT_RELIABLE and RELIABKE. Any other value passed in is considered the same as RELIABLE. 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.
Parameters:
reliable - the reliability level.

setSession

public void setSession(int session)
Sets the session level. Valid values are defined by the field NO_SESSION, TIGHT_SESSION and LOOSE_SESSION. Any other value passed will be considered 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.
Parameters:
session - the session level.

setSpeedLevel

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

setTracking

public void setTracking(int tracking)
Set the tracking level in sending the message. Valid values for tracking level are defined in as NO_TRACK, TIGHT_NOTIFICATION, TIGHT_FULL_TRACK, LOOSE_NOTIFICATION, LOOSE_FULL_TRACK 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.
Parameters:
tracking - the tracking level.

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.