com.threerings.presents.server
Class SessionFactory

java.lang.Object
  extended by com.threerings.presents.server.SessionFactory

public abstract class SessionFactory
extends Object

Used to determine what type of PresentsSession to use to manage an authenticated client as well the type of ClientResolver to use when resolving clients' runtime data.


Field Summary
static SessionFactory DEFAULT
          The default client factory.
 
Constructor Summary
SessionFactory()
           
 
Method Summary
abstract  Class<? extends ClientResolver> getClientResolverClass(Name username)
          Returns the ClientResolver derived class to use to resolve a client with the specified username or null if this factory does not handle clients of the supplied type.
abstract  Class<? extends PresentsSession> getSessionClass(AuthRequest areq)
          Returns the PresentsSession derived class to use for the session that authenticated with the supplied request or null if this factory does not handle sessions of the supplied type.
static SessionFactory newSessionFactory(Class<? extends Credentials> credsClass, Class<? extends PresentsSession> sessionClass, Class<? extends Name> nameClass, Class<? extends ClientResolver> resolverClass)
          Creates a session factory that handles clients with the supplied credentials and authentication name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static SessionFactory DEFAULT
The default client factory.

Constructor Detail

SessionFactory

public SessionFactory()
Method Detail

newSessionFactory

public static SessionFactory newSessionFactory(Class<? extends Credentials> credsClass,
                                               Class<? extends PresentsSession> sessionClass,
                                               Class<? extends Name> nameClass,
                                               Class<? extends ClientResolver> resolverClass)
Creates a session factory that handles clients with the supplied credentials and authentication name.


getSessionClass

public abstract Class<? extends PresentsSession> getSessionClass(AuthRequest areq)
Returns the PresentsSession derived class to use for the session that authenticated with the supplied request or null if this factory does not handle sessions of the supplied type.


getClientResolverClass

public abstract Class<? extends ClientResolver> getClientResolverClass(Name username)
Returns the ClientResolver derived class to use to resolve a client with the specified username or null if this factory does not handle clients of the supplied type.