org.jsmpp.session
Class AbstractSessionContext

java.lang.Object
  extended by org.jsmpp.session.AbstractSessionContext
All Implemented Interfaces:
ActivityNotifier, SessionContext
Direct Known Subclasses:
SMPPServerSessionContext, SMPPSessionContext

public abstract class AbstractSessionContext
extends java.lang.Object
implements SessionContext

Author:
uudashr

Constructor Summary
AbstractSessionContext()
           
AbstractSessionContext(SessionStateListener sessionStateListener)
           
 
Method Summary
 void addSessionStateListener(SessionStateListener l)
           
 void bound(BindType bindType)
          Change state to bound state.
protected abstract  void changeState(SessionState newState)
           
 void close()
          Change state to close.
protected  void fireStateChanged(SessionState newState, SessionState oldState, java.lang.Object source)
           
 long getLastActivityTimestamp()
          Get the last activity of a session.
 void notifyActivity()
          Notify an activity.
 void open()
          Change state to open.
 void removeSessionStateListener(SessionStateListener l)
           
 void unbound()
          Change state to unbound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jsmpp.session.SessionContext
getSessionState
 

Constructor Detail

AbstractSessionContext

public AbstractSessionContext()

AbstractSessionContext

public AbstractSessionContext(SessionStateListener sessionStateListener)
Method Detail

open

public void open()
Description copied from interface: SessionContext
Change state to open.

Specified by:
open in interface SessionContext

bound

public void bound(BindType bindType)
Description copied from interface: SessionContext
Change state to bound state.

Specified by:
bound in interface SessionContext

unbound

public void unbound()
Description copied from interface: SessionContext
Change state to unbound.

Specified by:
unbound in interface SessionContext

close

public void close()
Description copied from interface: SessionContext
Change state to close.

Specified by:
close in interface SessionContext

addSessionStateListener

public void addSessionStateListener(SessionStateListener l)

removeSessionStateListener

public void removeSessionStateListener(SessionStateListener l)

fireStateChanged

protected void fireStateChanged(SessionState newState,
                                SessionState oldState,
                                java.lang.Object source)

notifyActivity

public void notifyActivity()
Description copied from interface: ActivityNotifier
Notify an activity.

Specified by:
notifyActivity in interface ActivityNotifier

getLastActivityTimestamp

public long getLastActivityTimestamp()
Description copied from interface: SessionContext
Get the last activity of a session.

Specified by:
getLastActivityTimestamp in interface SessionContext
Returns:
the last activity timestamp.

changeState

protected abstract void changeState(SessionState newState)