|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectphp.java.bridge.http.SimpleContextFactory
public class SimpleContextFactory
Base of a set of visitors which can extend the standard ContextFactory.
ServletContextFactory
,
PhpScriptContextFactory
Method Summary | |
---|---|
void |
destroy()
Removes the context factory from the classloader's list of context factories and destroys its content. |
JavaBridge |
getBridge()
Return the JavaBridge. |
java.lang.ClassLoader |
getClassLoader()
Return the current class loader. |
IContext |
getContext()
Return a JSR223 context |
java.lang.String |
getId()
Return the serializable ID of the context factory |
SimpleJavaBridgeClassLoader |
getJavaBridgeClassLoader()
Return the JavaBridgeClassLoader, which wraps the DynamicJavaBridgeClassLoader |
ISession |
getSession(java.lang.String name,
boolean clientIsNew,
int timeout)
Return a session for the JavaBridge |
void |
initialize()
Called when the context is requested |
void |
invalidate()
Called at the end of the visitor's life cycle |
void |
recycle()
Called by recycle at the end of the script |
void |
recycle(java.lang.String id)
Update the context factory with the new JavaBridge obtained from the servlet |
void |
release()
Releases the context factory. |
void |
setClassLoader(java.lang.ClassLoader loader)
Set the current class loader |
void |
setContext(IContext context)
Set the Context into this factory. |
java.lang.String |
toString()
|
void |
visit(ContextFactory visited)
Called when a visitor has been attached. |
void |
waitFor(long timeout)
Wait for the context factory to finish. |
void |
waitForInitializedContext()
Wait for the context factory to finish. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void recycle(java.lang.String id) throws java.lang.SecurityException
IContextFactory
Update the context factory with the new JavaBridge obtained from the servlet
recycle
in interface IContextFactory
id
- The fresh id
java.lang.SecurityException
ContextFactory.recycle()
,
Request.setBridge(php.java.bridge.JavaBridge)
,
Request.recycle()
public void destroy()
IContextFactory
destroy
in interface IContextFactory
destroy
in interface IJavaBridgeFactory
public void invalidate()
IContextFactoryVisitor
invalidate
in interface IContextFactoryVisitor
public void initialize()
IContextFactoryVisitor
initialize
in interface IContextFactoryVisitor
IContextFactory.waitForInitializedContext()
public void waitForInitializedContext() throws java.lang.InterruptedException
waitForInitializedContext
in interface IContextFactory
java.lang.InterruptedException
ContextRunner
public void waitFor(long timeout) throws java.lang.InterruptedException
waitFor
in interface IContextFactory
timeout
- The timeout
java.lang.InterruptedException
ContextRunner
public java.lang.String getId()
IContextFactory
getId
in interface IContextFactory
public java.lang.String toString()
toString
in class java.lang.Object
public IContext getContext()
IContextFactory
getContext
in interface IContextFactory
getContext
in interface IJavaBridgeFactory
getContext()
,
Context
public JavaBridge getBridge()
IJavaBridgeFactory
getBridge
in interface IJavaBridgeFactory
public void visit(ContextFactory visited)
IContextFactoryVisitor
visit
in interface IContextFactoryVisitor
visited
- The context factorypublic ISession getSession(java.lang.String name, boolean clientIsNew, int timeout)
IJavaBridgeFactory
getSession
in interface IContextFactory
getSession
in interface IJavaBridgeFactory
name
- The session name. If name is null, the name PHPSESSION will be used.clientIsNew
- true if the client wants a new sessiontimeout
- timeout in seconds. If 0 the session does not expire.
ISession
public void setContext(IContext context)
IContextFactory
setContext
in interface IContextFactory
php.java.bridge.http.ContextFactory#addNew(String)
public void release()
IContextFactory
release
in interface IContextFactory
public void recycle()
recycle
in interface IJavaBridgeFactory
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface IContextFactory
public SimpleJavaBridgeClassLoader getJavaBridgeClassLoader()
getJavaBridgeClassLoader
in interface IJavaBridgeFactory
Util.getContextClassLoader()
public void setClassLoader(java.lang.ClassLoader loader)
setClassLoader
in interface IContextFactory
loader
- The DynamicJavaBridgeClassLoader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |