org.jdiameter.client.api
Interface IMessage

All Superinterfaces:
org.jdiameter.api.Answer, IAnswer, IRequest, org.jdiameter.api.Message, org.jdiameter.api.Request, java.io.Serializable, org.jdiameter.api.Wrapper

public interface IMessage
extends IRequest, IAnswer

This interface extends basic message interface Data: $Date: 2008/07/03 19:43:10 $ Revision: $Revision: 1.1 $

Version:
1.5.0.1

Field Summary
static int STATE_ANSWERED
          Stack received answer to this message
static int STATE_BUFFERED
          The message is biffered ( not use yet )
static int STATE_NOT_SENT
          The message is not sent to the network
static int STATE_SENT
          The message is ent to the network
 
Fields inherited from interface org.jdiameter.api.Message
ABORT_SESSION_ANSWER, ABORT_SESSION_REQUEST, ACCOUNTING_ANSWER, ACCOUNTING_REQUEST, CAPABILITIES_EXCHANGE_ANSWER, CAPABILITIES_EXCHANGE_REQUEST, DEVICE_WATCHDOG_ANSWER, DEVICE_WATCHDOG_REQUEST, DISCONNECT_PEER_ANSWER, DISCONNECT_PEER_REQUEST, RE_AUTH_ANSWER, RE_AUTH_REQUEST, SESSION_TERMINATION_ANSWER, SESSION_TERMINATION_REQUEST
 
Fields inherited from interface org.jdiameter.api.Message
ABORT_SESSION_ANSWER, ABORT_SESSION_REQUEST, ACCOUNTING_ANSWER, ACCOUNTING_REQUEST, CAPABILITIES_EXCHANGE_ANSWER, CAPABILITIES_EXCHANGE_REQUEST, DEVICE_WATCHDOG_ANSWER, DEVICE_WATCHDOG_REQUEST, DISCONNECT_PEER_ANSWER, DISCONNECT_PEER_REQUEST, RE_AUTH_ANSWER, RE_AUTH_REQUEST, SESSION_TERMINATION_ANSWER, SESSION_TERMINATION_REQUEST
 
Method Summary
 void clearTimer()
          Cancel timer
 java.lang.Object clone()
          Create clone object
 void createTimer(java.util.concurrent.ScheduledExecutorService scheduledFacility, long timeOut, java.util.concurrent.TimeUnit timeUnit)
          Create timer for request timout procedure
 java.lang.String getDuplicationKey()
          Return duplication key of message
 java.lang.String getDuplicationKey(java.lang.String host, long endToEndId)
          Generate duplication key
 IEventListener getEventListener()
          Return event listener
 int getFlags()
          Return flags as inteher
 long getHeaderApplicationId()
          Return header applicationId
 IPeer getPeer()
          Return attached peer
 org.jdiameter.api.ApplicationId getSingleApplicationId()
          Return application id
 int getState()
          Return state of message
 boolean isTimeOut()
          Check timeout
 void runTimer()
          Execute timer task
 void setEndToEndIdentifier(long endByEndId)
          Set end by end id
 void setHopByHopIdentifier(long hopByHopId)
          Set hop by hop id
 void setListener(IEventListener listener)
          Set event listener
 void setPeer(IPeer peer)
          Attach message to peer
 void setState(int newState)
          Set new state
 
Methods inherited from interface org.jdiameter.client.api.IRequest
setNetworkRequest
 
Methods inherited from interface org.jdiameter.api.Request
createAnswer, createAnswer, isNetworkRequest
 
Methods inherited from interface org.jdiameter.api.Message
getApplicationId, getApplicationIdAvps, getAvps, getCommandCode, getEndToEndIdentifier, getHopByHopIdentifier, getSessionId, getVersion, isError, isProxiable, isRequest, isReTransmitted, setError, setProxiable, setRequest, setReTransmitted
 
Methods inherited from interface org.jdiameter.api.Wrapper
isWrapperFor, unwrap
 
Methods inherited from interface org.jdiameter.api.Answer
getResultCode
 
Methods inherited from interface org.jdiameter.api.Message
getApplicationId, getApplicationIdAvps, getAvps, getCommandCode, getEndToEndIdentifier, getHopByHopIdentifier, getSessionId, getVersion, isError, isProxiable, isRequest, isReTransmitted, setError, setProxiable, setRequest, setReTransmitted
 
Methods inherited from interface org.jdiameter.api.Wrapper
isWrapperFor, unwrap
 

Field Detail

STATE_NOT_SENT

static final int STATE_NOT_SENT
The message is not sent to the network

See Also:
Constant Field Values

STATE_SENT

static final int STATE_SENT
The message is ent to the network

See Also:
Constant Field Values

STATE_BUFFERED

static final int STATE_BUFFERED
The message is biffered ( not use yet )

See Also:
Constant Field Values

STATE_ANSWERED

static final int STATE_ANSWERED
Stack received answer to this message

See Also:
Constant Field Values
Method Detail

getState

int getState()
Return state of message

Returns:
state of message

setState

void setState(int newState)
Set new state

Parameters:
newState - new state value

getHeaderApplicationId

long getHeaderApplicationId()
Return header applicationId

Returns:
header applicationId

getFlags

int getFlags()
Return flags as inteher

Returns:
flags as inteher

createTimer

void createTimer(java.util.concurrent.ScheduledExecutorService scheduledFacility,
                 long timeOut,
                 java.util.concurrent.TimeUnit timeUnit)
Create timer for request timout procedure

Parameters:
scheduledFacility - timer facility
timeOut - value of timeout
timeUnit - time unit

runTimer

void runTimer()
Execute timer task


clearTimer

void clearTimer()
Cancel timer


setHopByHopIdentifier

void setHopByHopIdentifier(long hopByHopId)
Set hop by hop id

Parameters:
hopByHopId - hopByHopId value

setEndToEndIdentifier

void setEndToEndIdentifier(long endByEndId)
Set end by end id

Parameters:
endByEndId - endByEndId value

getPeer

IPeer getPeer()
Return attached peer

Returns:
attached peer

setPeer

void setPeer(IPeer peer)
Attach message to peer

Parameters:
peer - attached peer

getSingleApplicationId

org.jdiameter.api.ApplicationId getSingleApplicationId()
Return application id

Returns:
application id

isTimeOut

boolean isTimeOut()
Check timeout

Returns:
true if request has timeout

setListener

void setListener(IEventListener listener)
Set event listener

Parameters:
listener - event listener

getEventListener

IEventListener getEventListener()
Return event listener

Returns:
event listener

getDuplicationKey

java.lang.String getDuplicationKey()
Return duplication key of message

Returns:
duplication key of message

getDuplicationKey

java.lang.String getDuplicationKey(java.lang.String host,
                                   long endToEndId)
Generate duplication key

Parameters:
host - origination host
endToEndId - end to end id
Returns:
duplication key

clone

java.lang.Object clone()
Create clone object

Returns:
clone


Copyright © 2008. All Rights Reserved.