com.lonniepryor.blues
Class Session

java.lang.Object
  |
  +--com.lonniepryor.blues.Session

public final class Session
extends java.lang.Object

Represents a binding of an Engine to a Thread. An instance of Engine can be bound to the current Thread by creating an instance of this class. The Thread will be bound until dispose() is called on the Session instance. Instances of this class should NEVER be shared between Threads.

Version:
$Revision: 1.1 $
Author:
Lonnie Pryor

Constructor Summary
Session(Engine engine)
          Creates a new Session object.
 
Method Summary
 void dispose()
          Destroys this Session and releases the current Thread.
 java.lang.Object lookupDispatcher(java.lang.Class dispatcherInterface)
          Looks up the specified service in this Session.
 java.lang.Object lookupService(java.lang.String fullName)
          Looks up the specified service in this Session.
 java.lang.Object lookupSingleton(java.lang.Class singletonInterface)
          Looks up the specified singleton in this Session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Session

public Session(Engine engine)
Creates a new Session object.

Parameters:
engine - The Engine to bind to.
Method Detail

lookupSingleton

public java.lang.Object lookupSingleton(java.lang.Class singletonInterface)
Looks up the specified singleton in this Session.

Parameters:
singletonInterface - The type of the singleton instance.
Returns:
The requested singleton instance.

lookupService

public java.lang.Object lookupService(java.lang.String fullName)
Looks up the specified service in this Session.

Parameters:
fullName - The name of the service instance.
Returns:
The requested service instance.

lookupDispatcher

public java.lang.Object lookupDispatcher(java.lang.Class dispatcherInterface)
Looks up the specified service in this Session.

Parameters:
dispatcherInterface - The name of the service instance.
Returns:
The requested service instance.

dispose

public void dispose()
Destroys this Session and releases the current Thread.



Copyright © 2003 Blues Framework. All Rights Reserved.