php.java.bridge
Class GlobalRef

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

public class GlobalRef
extends java.lang.Object

A global array of object references that the client keeps during the connection. (int -> Object mappings). After connection shutdown the request-handling bridge instance and its global ref array are destroyed. NOTE: We guarantee that for each entry < 1024: entry2 = entry1+1 so that simple clients can "guess" the next handle value. The current implementation uses an array and new entries are always appended at the end (until the request terminates or until an OOM error occurs). A future implementation may use an int hash table instead (but see note above).


Constructor Summary
GlobalRef(JavaBridge bridge)
           
 
Method Summary
 int append(java.lang.Object object)
           
 java.lang.String dump()
           
 java.lang.Object get(int id)
           
 void remove(int id)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalRef

public GlobalRef(JavaBridge bridge)
Method Detail

get

public java.lang.Object get(int id)

remove

public void remove(int id)

dump

public java.lang.String dump()

append

public int append(java.lang.Object object)