forked from micw/php-java-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIContinuation.java
More file actions
41 lines (36 loc) · 1.21 KB
/
Copy pathIContinuation.java
File metadata and controls
41 lines (36 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package php.java.script;
/**
* Classes implementing this interface represent the script continuation;
* they can be used to allocate php scripts on a HTTP- or FastCGI server.
* @author jostb
*
*/
public interface IContinuation {
/**
* The PHP script must call this function with the current
* continuation as an argument.<p>
*
* Example:<p>
* <code>
* java_context()->call(java_closure());<br>
* </code>
* @param script - The php continuation
* @throws InterruptedException
*/
public void call(Object script) throws InterruptedException;
/**
* One must call this function if one is interested in the php continuation.
* @return The php continuation.
* @throws Exception
*/
public Object getPhpScript() throws Exception;
/**
* This function must be called to release the allocated php continuation.
* Note that simply calling this method does not guarantee that
* the script is finished, as the ContextRunner may still produce output.
* Use contextFactory.waitFor() to wait for the script to terminate.
* @throws InterruptedException
*
*/
public void release() throws InterruptedException;
}