org.apache.commons.messenger
Class DefaultServerSession

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.commons.messenger.DefaultServerSession
All Implemented Interfaces:
Runnable, javax.jms.ServerSession

public class DefaultServerSession
extends Thread
implements javax.jms.ServerSession

DefaultServerSession is a default implementation of the JMS ServerSession interface.

Version:
$Revision: 155459 $
Author:
James Strachan

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DefaultServerSession(javax.jms.Session session)
           
 
Method Summary
 javax.jms.Session getSession()
          Return the ServerSession's Session.
 void run()
           
 void start()
          Cause the session's run method to be called to process messages that were just assigned to it.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultServerSession

public DefaultServerSession(javax.jms.Session session)
                     throws javax.jms.JMSException
Throws:
javax.jms.JMSException
Method Detail

getSession

public javax.jms.Session getSession()
                             throws javax.jms.JMSException
Return the ServerSession's Session. This must be a Session created by the same Connection which will be dispatching messages to it. The provider will assign one or more messages to the Session and then call start on the ServerSession.

Specified by:
getSession in interface javax.jms.ServerSession
Returns:
the server session's session.
Throws:
javax.jms.JMSException - if a JMS error occurs.

start

public void start()
Cause the session's run method to be called to process messages that were just assigned to it.

Specified by:
start in interface javax.jms.ServerSession
Overrides:
start in class Thread

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.