org.jdiameter.client.impl
Class BaseSessionImpl

java.lang.Object
  extended by org.jdiameter.client.impl.BaseSessionImpl
All Implemented Interfaces:
BaseSession
Direct Known Subclasses:
RawSessionImpl, SessionImpl

public abstract class BaseSessionImpl
extends java.lang.Object
implements BaseSession

Implementation for BaseSession.

Author:
erick.svenson@yahoo.com, Alexandre Mendonca , Bartosz Baranowski

Field Summary
protected  IContainer container
           
protected  long creationTime
           
protected  boolean isValid
           
protected  long lastAccessedTime
           
protected  IMessageParser parser
           
protected  NetworkReqListener reqListener
           
protected  java.lang.String sessionId
           
 
Constructor Summary
BaseSessionImpl()
           
 
Method Summary
protected  void appendAppId(ApplicationId appId, Message m)
          Appends an *-Application-Id AVP to the message, if none is present already.
protected  IEventListener createListenerWrapper(EventListener listener)
           
protected  void genericSend(Message message, EventListener listener)
           
protected  void genericSend(Message aMessage, EventListener listener, long timeout, java.util.concurrent.TimeUnit timeUnit)
           
protected  long getAppId(ApplicationId appId)
           
 long getCreationTime()
           
 long getLastAccessedTime()
           
 java.lang.String getSessionId()
           
 boolean isAppSession()
           
 boolean isReplicable()
           
 boolean isValid()
           
 java.util.concurrent.Future<Message> send(Message message)
           
 java.util.concurrent.Future<Message> send(Message message, long timeOut, java.util.concurrent.TimeUnit timeUnit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jdiameter.api.BaseSession
release
 

Field Detail

creationTime

protected final long creationTime

lastAccessedTime

protected long lastAccessedTime

isValid

protected boolean isValid

sessionId

protected java.lang.String sessionId

container

protected transient IContainer container

parser

protected transient IMessageParser parser

reqListener

protected NetworkReqListener reqListener
Constructor Detail

BaseSessionImpl

public BaseSessionImpl()
Method Detail

getCreationTime

public long getCreationTime()
Specified by:
getCreationTime in interface BaseSession

getLastAccessedTime

public long getLastAccessedTime()
Specified by:
getLastAccessedTime in interface BaseSession

isValid

public boolean isValid()
Specified by:
isValid in interface BaseSession

getSessionId

public java.lang.String getSessionId()
Specified by:
getSessionId in interface BaseSession

isAppSession

public boolean isAppSession()
Specified by:
isAppSession in interface BaseSession

isReplicable

public boolean isReplicable()
Specified by:
isReplicable in interface BaseSession

genericSend

protected void genericSend(Message message,
                           EventListener listener)
                    throws InternalException,
                           IllegalDiameterStateException,
                           RouteException,
                           OverloadException
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

genericSend

protected void genericSend(Message aMessage,
                           EventListener listener,
                           long timeout,
                           java.util.concurrent.TimeUnit timeUnit)
                    throws InternalException,
                           IllegalDiameterStateException,
                           RouteException,
                           OverloadException
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

createListenerWrapper

protected IEventListener createListenerWrapper(EventListener listener)

send

public java.util.concurrent.Future<Message> send(Message message)
                                          throws InternalException,
                                                 IllegalDiameterStateException,
                                                 RouteException,
                                                 OverloadException
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

send

public java.util.concurrent.Future<Message> send(Message message,
                                                 long timeOut,
                                                 java.util.concurrent.TimeUnit timeUnit)
                                          throws InternalException,
                                                 IllegalDiameterStateException,
                                                 RouteException,
                                                 OverloadException
Throws:
InternalException
IllegalDiameterStateException
RouteException
OverloadException

appendAppId

protected void appendAppId(ApplicationId appId,
                           Message m)
Appends an *-Application-Id AVP to the message, if none is present already.

Parameters:
appId - the application-id value
m - the message to append the *-Application-Id

getAppId

protected long getAppId(ApplicationId appId)


Copyright © 2014. All Rights Reserved.