### php.java.bridge

# Class SessionFactory

- `java.lang.Object`

- `php.java.bridge.SessionFactory`

Known Direct Subclasses:
  ContextFactory

`public class SessionFactory`
`extends java.lang.Object`

Create new session or context instances

Author:
  jostb

See Also:
  `php.java.bridge.Session`, `Context`, `Context`, `ContextFactory`, `ContextFactory`, `PhpScriptContextFactory`

## Method Summary

`java.lang.Object`

`getContext()`
  Return the associated context

`ISession`

`getSession(java.lang.String name, boolean clientIsNew, int timeout)`

### Methods inherited from class java.lang.Object

`equals`, `getClass`, `hashCode`, `notify`, `notifyAll`, `toString`, `wait`, `wait`, `wait`

## Method Details

### getContext

    public java.lang.Object getContext()

> Return the associated context

> Returns:
>   The context

### getSession

    public ISession getSession(java.lang.String name,
                               boolean clientIsNew,
                               int timeout)

> Parameters:
>   `name` - The session name. If name is null, the session is an internal session
>   `clientIsNew` - true if the client wants a new session
>   `timeout` - timeout in seconds. If 0 the session does not expire.