php.java.bridge
Interface IJavaBridgeFactory

All Known Subinterfaces:
IContextFactory, IContextFactoryVisitor
All Known Implementing Classes:
ContextFactory, InteractivePhpScriptContextFactory, InvocablePhpServletContextFactory, JavaBridgeFactory, PhpScriptContextFactory, PhpServletContextFactory, RemoteServletContextFactory, ServletContextFactory, SessionFactory, SimpleContextFactory, SimpleServletContextFactory

public interface IJavaBridgeFactory

Create PHP/Java Bridge instances.


Method Summary
 void destroy()
          Destroy the factory
 JavaBridge getBridge()
          Return the JavaBridge.
 IContext getContext()
          Return the associated JSR223 context
 SimpleJavaBridgeClassLoader getJavaBridgeClassLoader()
          Return an instance of the JavaBridgeClassLoader.
 ISession getSession(boolean clientIsNew, int timeout)
           
 ISession getSession(java.lang.String name, boolean clientIsNew, int timeout)
          Return a session for the JavaBridge
 boolean isNew()
          Return true if this factory has already created a bridge or not.
 void recycle()
          Recycle the factory for new reqests.
 

Method Detail

getJavaBridgeClassLoader

SimpleJavaBridgeClassLoader getJavaBridgeClassLoader()
Return an instance of the JavaBridgeClassLoader. Return an instance of SimpleJavaBridgeClassLoader, or, if you want to support java_require(), an instance of the JavaBridgeClassLoader with the current thread context class loader as a delegate.

Returns:
The JavaBridgeClassLoader
See Also:
Util.getContextClassLoader()

getSession

ISession getSession(java.lang.String name,
                    boolean clientIsNew,
                    int timeout)
Return a session for the JavaBridge

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

getSession

ISession getSession(boolean clientIsNew,
                    int timeout)
Parameters:
clientIsNew - true if the client wants a new session
timeout - timeout in seconds. If 0 the session does not expire.
Returns:
The session

getContext

IContext getContext()
Return the associated JSR223 context

Returns:
The JSR223 context, if supported by the environment or null.
See Also:
ContextFactory.getContext()

isNew

boolean isNew()
Return true if this factory has already created a bridge or not.

Returns:
true if this factory is new, false otherwise

getBridge

JavaBridge getBridge()
Return the JavaBridge.

Returns:
Returns the bridge.

recycle

void recycle()
Recycle the factory for new reqests.


destroy

void destroy()
Destroy the factory