Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## php.java.bridge
Class JavaBridgeRunner

    java.lang.Object
      php.java.bridge.http.HttpServer
          php.java.bridge.JavaBridgeRunner

All Implemented Interfaces:
  java.lang.Runnable

    public class JavaBridgeRunner

extends HttpServer

This is the main entry point for the PHP/Java Bridge library. Example:
public MyClass {
public static void main(String s[]) {
JavaBridgeRunner runner = JavaBridgeRunner.getInstance();
// connect to port 9267 and send protocol requests ...
runner.destroy();
}
}

Author:
  jostb
See Also:
  `PhpScriptContext`

Field Summary

Fields inherited from class php.java.bridge.http.HttpServer
`GET, POST, PUT`

Method Summary
`ISocketFactory` | `bind(java.lang.String addr)` Create a server socket.
`static JavaBridgeRunner` | `getInstance()` Return a instance.
`static JavaBridgeRunner` | `getStandaloneInstance()` Return a standalone instance.
`boolean` | `isStandalone()` Return true if this is a standalone server
`static void` | `main(java.lang.String[] s)` For internal tests only.

Methods inherited from class php.java.bridge.http.HttpServer
`destroy, getSocket, run`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static JavaBridgeRunner getInstance()
                                        throws java.io.IOException

  Return a instance.

  Returns:
    a standalone runner
  Throws:
    `java.io.IOException`

### getStandaloneInstance

    public static JavaBridgeRunner getStandaloneInstance()
                                                  throws java.io.IOException

  Return a standalone instance. It sets a flag which indicates that the runner will be used as a standalone component outside of the Servlet environment.

  Returns:
    a standalone runner
  Throws:
    `java.io.IOException`

### bind

    public ISocketFactory bind(java.lang.String addr)
                        throws java.io.IOException

  Create a server socket.

  Specified by:
    `bind` in class `HttpServer`
  Parameters:
    `addr` - The host address, either INET:port or INET_LOCAL:port
  Returns:
    The server socket.
  Throws:
    `java.io.IOException`

### isStandalone

    public boolean isStandalone()

  Return true if this is a standalone server

  Returns:
    true if this runner is a standalone runner (see `main(String[])`) , false otherwise.

### main

    public static void main(java.lang.String[] s)
                     throws java.lang.InterruptedException,
                            java.io.IOException

  For internal tests only.

  Throws:
    `java.lang.InterruptedException`
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD