|
||||||||||
| 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. Instances of this class are thrown away at the end of the request.
ServletContextFactory,
PhpScriptContextFactory| Method Summary | |
|---|---|
void |
destroy()
Destroy the factory |
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 |
java.lang.String |
getRedirectString()
Return the redirect string, for example h:localhost:8080/JavaBridge/test.php |
java.lang.String |
getRedirectString(java.lang.String webPath)
Return the redirect string, for example h:localhost:8080/webPath |
ISession |
getSession(boolean clientIsNew,
int timeout)
|
ISession |
getSession(java.lang.String name,
boolean clientIsNew,
int timeout)
Return a session for the JavaBridge |
java.lang.String |
getSocketName()
Return the socket name, for example 8080 |
void |
initialize()
Called when the context runner starts |
void |
invalidate()
Hook is called at the end of the visitor's life cycle. |
boolean |
isNew()
Return true if this factory has already created a bridge or not. |
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 |
releaseManaged()
Wait for the context factory to finish, then release |
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void recycle(java.lang.String id)
Update the context factory with the new JavaBridge obtained from the servlet
recycle in interface IContextFactoryid - The fresh idContextFactory.recycle(),
Request.setBridge(php.java.bridge.JavaBridge),
Request.recycle()public void destroy()
destroy in interface IJavaBridgeFactorypublic void invalidate()
invalidate in interface IContextFactoryIJavaBridgeFactory.destroy(),
IJavaBridgeFactory.recycle()public void initialize()
initialize in interface IContextFactoryIContextFactory.releaseManaged(),
IJavaBridgeFactory.destroy()
public void releaseManaged()
throws java.lang.InterruptedException
releaseManaged in interface IContextFactoryjava.lang.InterruptedExceptionContextRunner
public void waitFor(long timeout)
throws java.lang.InterruptedException
waitFor in interface IContextFactorytimeout - The timeout
java.lang.InterruptedExceptionContextRunnerpublic java.lang.String getId()
getId in interface IContextFactorypublic java.lang.String toString()
toString in class java.lang.Objectpublic IContext getContext()
getContext in interface IContextFactorygetContext in interface IJavaBridgeFactorygetContext(),
Contextpublic boolean isNew()
isNew in interface IJavaBridgeFactorypublic JavaBridge getBridge()
getBridge in interface IJavaBridgeFactorypublic void visit(ContextFactory visited)
visit in interface IContextFactoryVisitorvisited - The context factory
public ISession getSession(java.lang.String name,
boolean clientIsNew,
int timeout)
getSession in interface IContextFactorygetSession in interface IJavaBridgeFactoryname - 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 ISession getSession(boolean clientIsNew,
int timeout)
getSession in interface IJavaBridgeFactoryclientIsNew - true if the client wants a new sessiontimeout - timeout in seconds. If 0 the session does not expire.
public void setContext(IContext context)
setContext in interface IContextFactoryContextFactory.addNew()public void release()
release in interface IContextFactorypublic void recycle()
recycle in interface IJavaBridgeFactorypublic java.lang.ClassLoader getClassLoader()
getClassLoader in interface IContextFactorypublic SimpleJavaBridgeClassLoader getJavaBridgeClassLoader()
getJavaBridgeClassLoader in interface IJavaBridgeFactoryUtil.getContextClassLoader()public void setClassLoader(java.lang.ClassLoader loader)
setClassLoader in interface IContextFactoryloader - The DynamicJavaBridgeClassLoaderpublic java.lang.String getSocketName()
getSocketName in interface IContextFactorypublic java.lang.String getRedirectString()
getRedirectString in interface IContextFactorypublic java.lang.String getRedirectString(java.lang.String webPath)
getRedirectString in interface IContextFactorywebPath - Usually request.getContextPath()+request.getServletPath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||