public class MessageImpl extends Object implements IMessage
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MessageImpl.TimerTask |
STATE_ANSWERED, STATE_BUFFERED, STATE_NOT_SENT, STATE_SENTABORT_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| Modifier and Type | Method and Description |
|---|---|
void |
clearTimer()
Cancel timer
|
Object |
clone()
Create clone object
|
protected void |
copyHeader(MessageImpl request) |
Answer |
createAnswer() |
Answer |
createAnswer(long resultCode) |
Answer |
createAnswer(long vendorId,
long experimentalResultCode) |
void |
createTimer(ScheduledExecutorService scheduledFacility,
long timeOut,
TimeUnit timeUnit)
Create timer for request timout procedure
|
boolean |
equals(Object o) |
long |
getApplicationId() |
List<ApplicationId> |
getApplicationIdAvps() |
AvpSet |
getAvps() |
int |
getCommandCode() |
String |
getDuplicationKey()
Return duplication key of message
|
String |
getDuplicationKey(String host,
long endToEndId)
Generate duplication key
|
long |
getEndToEndIdentifier() |
IEventListener |
getEventListener()
Return event listener
|
int |
getFlags()
Return flags as inteher
|
long |
getHeaderApplicationId()
Return header applicationId
|
long |
getHopByHopIdentifier() |
IPeer |
getPeer()
Return attached peer
|
Avp |
getResultCode() |
String[] |
getRoutingInfo() |
String |
getSessionId() |
ApplicationId |
getSingleApplicationId()
Return application id
|
ApplicationId |
getSingleApplicationId(long applicationId)
Return application id
|
int |
getState()
Return state of message
|
byte |
getVersion() |
int |
hashCode() |
boolean |
isError() |
boolean |
isNetworkRequest() |
boolean |
isProxiable() |
boolean |
isRequest() |
boolean |
isReTransmitted() |
boolean |
isTimeOut()
Check timeout
|
boolean |
isWrapperFor(Class<?> aClass) |
void |
runTimer()
Execute timer task
|
void |
setEndToEndIdentifier(long endByEndId)
Set end by end id
|
void |
setError(boolean b) |
void |
setHeaderApplicationId(long applicationId)
Set header message application id
|
void |
setHopByHopIdentifier(long hopByHopId)
Set hop by hop id
|
void |
setListener(IEventListener listener)
Set event listener
|
void |
setNetworkRequest(boolean isNetworkRequest)
Set network request flag
|
void |
setPeer(IPeer peer)
Attach message to peer
|
void |
setProxiable(boolean b) |
void |
setRequest(boolean b) |
void |
setReTransmitted(boolean b) |
void |
setState(int newState)
Set new state
|
String |
toString() |
<T> T |
unwrap(Class<T> aClass) |
public String[] getRoutingInfo()
public byte getVersion()
getVersion in interface Messagepublic void setRequest(boolean b)
setRequest in interface Messagepublic boolean isProxiable()
isProxiable in interface Messagepublic void setProxiable(boolean b)
setProxiable in interface Messagepublic boolean isReTransmitted()
isReTransmitted in interface Messagepublic void setReTransmitted(boolean b)
setReTransmitted in interface Messagepublic int getCommandCode()
getCommandCode in interface Messagepublic String getSessionId()
getSessionId in interface Messagepublic Answer createAnswer()
createAnswer in interface Requestpublic Answer createAnswer(long resultCode)
createAnswer in interface Requestpublic Answer createAnswer(long vendorId, long experimentalResultCode)
createAnswer in interface Requestpublic long getApplicationId()
getApplicationId in interface Messagepublic ApplicationId getSingleApplicationId()
IMessagegetSingleApplicationId in interface IMessagepublic List<ApplicationId> getApplicationIdAvps()
getApplicationIdAvps in interface Messagepublic ApplicationId getSingleApplicationId(long applicationId)
IMessagegetSingleApplicationId in interface IMessagepublic long getHopByHopIdentifier()
getHopByHopIdentifier in interface Messagepublic long getEndToEndIdentifier()
getEndToEndIdentifier in interface Messageprotected void copyHeader(MessageImpl request)
public Avp getResultCode()
getResultCode in interface Answerpublic void setNetworkRequest(boolean isNetworkRequest)
IRequestsetNetworkRequest in interface IRequestisNetworkRequest - true if this request is neteorkpublic boolean isNetworkRequest()
isNetworkRequest in interface Requestpublic boolean isWrapperFor(Class<?> aClass) throws InternalException
isWrapperFor in interface WrapperInternalExceptionpublic <T> T unwrap(Class<T> aClass) throws InternalException
unwrap in interface WrapperInternalExceptionpublic void setHopByHopIdentifier(long hopByHopId)
IMessagesetHopByHopIdentifier in interface IMessagehopByHopId - hopByHopId valuepublic void setEndToEndIdentifier(long endByEndId)
IMessagesetEndToEndIdentifier in interface IMessageendByEndId - endByEndId valuepublic void setPeer(IPeer peer)
IMessagepublic int getState()
IMessagepublic long getHeaderApplicationId()
IMessagegetHeaderApplicationId in interface IMessagepublic void setHeaderApplicationId(long applicationId)
IMessagesetHeaderApplicationId in interface IMessageapplicationId - header message application idpublic int getFlags()
IMessagepublic void setState(int newState)
IMessagepublic void createTimer(ScheduledExecutorService scheduledFacility, long timeOut, TimeUnit timeUnit)
IMessagecreateTimer in interface IMessagescheduledFacility - timer facilitytimeOut - value of timeouttimeUnit - time unitpublic void runTimer()
IMessagepublic boolean isTimeOut()
IMessagepublic void setListener(IEventListener listener)
IMessagesetListener in interface IMessagelistener - event listenerpublic IEventListener getEventListener()
IMessagegetEventListener in interface IMessagepublic void clearTimer()
IMessageclearTimer in interface IMessagepublic String getDuplicationKey()
IMessagegetDuplicationKey in interface IMessagepublic String getDuplicationKey(String host, long endToEndId)
IMessagegetDuplicationKey in interface IMessagehost - origination hostendToEndId - end to end idCopyright © 2016. All Rights Reserved.