php.java.bridge
Class SessionFactory

java.lang.Object
  extended by php.java.bridge.JavaBridgeFactory
      extended by php.java.bridge.SessionFactory
All Implemented Interfaces:
IJavaBridgeFactory
Direct Known Subclasses:
ContextFactory

public class SessionFactory
extends JavaBridgeFactory

Create new session or context instances

Author:
jostb
See Also:
Session, Context, Context, ContextFactory, ServletContextFactory, PhpScriptContextFactory

Field Summary
static long TIMER_DURATION
          Check for expired sessions or contexts every 10 minutes
static long TIMER_FREQ
          Deprecated. Use TIMER_DURATION
 
Constructor Summary
SessionFactory()
           
 
Method Summary
 void destroy()
          Destroy the factory
 java.lang.ClassLoader getClassLoader()
          Return an instance of the current thread context class loader.
 IContext getContext()
          Return the associated context
 SimpleJavaBridgeClassLoader getJavaBridgeClassLoader()
          Return an instance of the JavaBridgeClassLoader
 ISession getSession(java.lang.String name, boolean clientIsNew, int timeout)
           
 void recycle()
          Recycle the factory for new reqests.
 
Methods inherited from class php.java.bridge.JavaBridgeFactory
getBridge
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMER_DURATION

public static final long TIMER_DURATION
Check for expired sessions or contexts every 10 minutes

See Also:
Constant Field Values

TIMER_FREQ

public static final long TIMER_FREQ
Deprecated. Use TIMER_DURATION
See Also:
Constant Field Values
Constructor Detail

SessionFactory

public SessionFactory()
Method Detail

getJavaBridgeClassLoader

public SimpleJavaBridgeClassLoader getJavaBridgeClassLoader()
Description copied from class: JavaBridgeFactory
Return an instance of the JavaBridgeClassLoader

Specified by:
getJavaBridgeClassLoader in class JavaBridgeFactory
Returns:
The JavaBridgeClassLoader

getClassLoader

public java.lang.ClassLoader getClassLoader()
Description copied from class: JavaBridgeFactory
Return an instance of the current thread context class loader.

Specified by:
getClassLoader in class JavaBridgeFactory
Returns:
The CurrentThreadContextClassLoader

getSession

public ISession getSession(java.lang.String name,
                           boolean clientIsNew,
                           int timeout)
Parameters:
name - The session name. If name is null, the name PHPSESSION will be used.
clientIsNew - true if the client wants a new session
timeout - timeout in seconds. If 0 the session does not expire.
Returns:
The session
See Also:
ISession

getContext

public IContext getContext()
Return the associated context

Returns:
Always null
See Also:
ContextFactory.getContext()

recycle

public void recycle()
Recycle the factory for new reqests.


destroy

public void destroy()
Destroy the factory