|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphp.java.bridge.http.ContextRunner
public class ContextRunner
The ContextRunner usually represents the physical connection, it manages the "high speed" communication link. It pulls a ContextFactory and executes it. After execution the context is destroyed.
ContextRunners are kept in a per-loader map and each client may refer to its runner by passing X_JAVARIDGE_CONTEXT_DEFAULT. The ContextRunner may ignore this hint and prepare for a new physical connection, if the ID does not exist in its map. This usually happens when there are two separate bridges installed in context A and context B and the client uses a persistent connection to context A. An attempt to re-use the same connection for B fails because the classes are loaded via two separate class loaders. A client must check the returned X_JAVABRIDGE_CONTEXT_DEFAULT value. If it is not set, the client must create a new physical connection. For named pipes this means that the connection should have been prepared and sent via X_JAVABRIDGE_CHANNEL, as usual. Otherwise the bridge will use the SocketContextServer instead. -- The client may destroy the new pipe, if the server has accepted X_JAVABRIDGE_CONTEXT_DEFAULT, of course.
See http://php-java-bridge.sourceforge.net#global-servlet for details how to install the bridge globally.
| Method Summary | |
|---|---|
static ContextRunner |
checkRunner(IContextServer.ChannelName channelName)
May be called to recycle the runner from the pool of ContextRunners for a new contextServer. |
IContextServer.Channel |
getChannel()
Return the channel of the current runner. |
void |
recycle(IContextFactory ctx)
Recycle the runner for a different web context. |
void |
run()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ContextRunner checkRunner(IContextServer.ChannelName channelName)
channelName - the channelName. This procedure sets the runner into channelName as a side effect.
public void recycle(IContextFactory ctx)
ctx - the old contextFacory belonging to a different contextServerpublic IContextServer.Channel getChannel()
public void run()
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||