|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphp.java.bridge.JavaBridgeFactory
php.java.bridge.SessionFactory
php.java.bridge.http.RemoteHttpContextFactory
public class RemoteHttpContextFactory
Create session contexts for servlets.
This ContextFactory can be used in environments where no custom class loaders and no threads are allowed.
ContextFactory,
ContextServer,
Serialized Form| Field Summary |
|---|
| Fields inherited from class php.java.bridge.SessionFactory |
|---|
TIMER_DURATION |
| Constructor Summary | |
|---|---|
RemoteHttpContextFactory(HttpRequest req,
HttpResponse res)
|
|
| Method Summary | |
|---|---|
static IContextFactory |
addNew(HttpRequest req,
HttpResponse res,
IContextFactoryVisitor impl)
Create and add a new ContextFactory. |
void |
destroy()
Destroy the factory |
void |
flushBuffer()
Flush the response buffer |
IContext |
getContext()
Return the associated context |
java.lang.String |
getId()
Return the serializable ID of the context factory |
ISession |
getSimpleSession(java.lang.String name,
short clientIsNew,
int timeout)
|
void |
initialize()
Called when the context runner starts |
void |
invalidate()
Hook is called at the end of the life cycle. |
void |
parseHeader(Request req,
java.io.InputStream in)
Called for the request header |
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 until this context is finished and release/destroy it. |
void |
setContext(IContext context)
Set the Context into this factory. |
void |
setResponse(HttpResponse out)
Set the current response |
void |
waitFor(long timeout)
Wait until this context is finished. |
| Methods inherited from class php.java.bridge.SessionFactory |
|---|
destroyTimer, getSession |
| Methods inherited from class php.java.bridge.JavaBridgeFactory |
|---|
getBridge, isNew, recycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface php.java.bridge.http.IContextFactory |
|---|
getSession |
| Methods inherited from interface php.java.bridge.IJavaBridgeFactory |
|---|
getBridge, isNew, recycle |
| Constructor Detail |
|---|
public RemoteHttpContextFactory(HttpRequest req,
HttpResponse res)
| Method Detail |
|---|
public static IContextFactory addNew(HttpRequest req,
HttpResponse res,
IContextFactoryVisitor impl)
req - The HttpRequestres - The HttpResponse
public java.lang.String getId()
getId in interface IContextFactorypublic void initialize()
initialize in interface IContextFactoryIContextFactory.releaseManaged(),
IJavaBridgeFactory.destroy()public void invalidate()
invalidate in interface IJavaBridgeFactoryinvalidate in class SessionFactoryIJavaBridgeFactory.destroy(),
IJavaBridgeFactory.recycle()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 release()
release in interface IContextFactory
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.InterruptedExceptionContextRunner
public void parseHeader(Request req,
java.io.InputStream in)
throws java.io.IOException
parseHeader in interface IJavaBridgeFactoryparseHeader in class JavaBridgeFactoryreq - the current requestin - the input stream
java.io.IOExceptionpublic void setContext(IContext context)
setContext in interface IContextFactoryContextFactory.addNew()public IContext getContext()
getContext in interface IContextFactorygetContext in interface IJavaBridgeFactorygetContext in class SessionFactoryContextFactory.getContext()public void destroy()
destroy in interface IJavaBridgeFactorydestroy in class JavaBridgeFactory
public void flushBuffer()
throws java.io.IOException
flushBuffer in interface IJavaBridgeFactoryflushBuffer in class SessionFactoryjava.io.IOExceptionpublic void setResponse(HttpResponse out)
out - the PhpJavaServlet response
public ISession getSimpleSession(java.lang.String name,
short clientIsNew,
int timeout)
getSimpleSession in interface IContextFactoryname - 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||