php.java.bridge
Class Standalone

java.lang.Object
  extended by php.java.bridge.Standalone

public class Standalone
extends java.lang.Object

This is the standalone container of the PHP/Java Bridge. It starts the standalone back-end, listenes for protocol requests and handles CreateInstance, GetSetProp and Invoke requests. Supported protocol modes are INET (listens on all interfaces), INET_LOCAL (loopback only), HTTP, HTTP_LOCAL, HTTPS and HTTPS_LOCAL (starts the built-in servlet engine listening on all interfaces or loopback).

Example:
java -Djava.awt.headless=true -jar JavaBridge.jar INET_LOCAL:9676 5 bridge.log &
telnet localhost 9676
<CreateInstance value="java.lang.Long" predicate="Instance" id="0">
<Long value="6"/>
</CreateInstance>
<Invoke value="1" method="toString" predicate="Invoke" id="0"/>


Field Summary
static int HTTP_PORT_BASE
          The default HTTP port for management clients
static int HTTPS_PORT_BASE
          The default HTTP port for management clients
 
Constructor Summary
Standalone()
           
 
Method Summary
static java.io.File getCanonicalWindowsFile(java.lang.String path)
          Returns the canonical windows file.
static void main(java.lang.String[] s)
          Start the PHP/Java Bridge.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_PORT_BASE

public static final int HTTP_PORT_BASE
The default HTTP port for management clients

See Also:
Constant Field Values

HTTPS_PORT_BASE

public static final int HTTPS_PORT_BASE
The default HTTP port for management clients

See Also:
Constant Field Values
Constructor Detail

Standalone

public Standalone()
Method Detail

getCanonicalWindowsFile

public static java.io.File getCanonicalWindowsFile(java.lang.String path)
Returns the canonical windows file. For example c:\program files instead of c:\programme

Parameters:
path - The path, may be an empty string.
Returns:
the canonical file.

main

public static void main(java.lang.String[] s)
Start the PHP/Java Bridge.
Example:
java -Djava.awt.headless=true -jar JavaBridge.jar INET:9656 5 /var/log/php-java-bridge.log
Note: Do not write anything to System.out, this stream is connected with a pipe which waits for the channel name.

Parameters:
s - an array of [socketname, level, logFile]