|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphp.java.bridge.GlobalRef
class GlobalRef
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. We guarantee that the first ref ID is 1 and that each new ref ID is n+1. This can be used to avoid round-trips by "guessing" the next object ID, see java_begin_document()/java_end_document().
| Nested Class Summary | |
|---|---|
(package private) class |
GlobalRef.Entry
|
| Field Summary | |
|---|---|
static int |
DEFAULT_SIZE
The default size (prime). |
| Constructor Summary | |
|---|---|
GlobalRef()
Create a new global ref table. |
|
GlobalRef(int initialCapacity)
|
|
| Method Summary | |
|---|---|
int |
append(java.lang.Object value)
Append an object to the global ref table. |
java.lang.String |
dump()
Return a string representation of the global ref table. |
java.lang.Object |
get(int id)
Get the object associated with the ref ID |
void |
remove(int id)
Remove an element from the table. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_SIZE
| Constructor Detail |
|---|
public GlobalRef(int initialCapacity)
public GlobalRef()
| Method Detail |
|---|
public java.lang.Object get(int id)
id - The ref ID
java.lang.NullPointerException - if ref ID does not exist.public void remove(int id)
id - The ref ID.public java.lang.String dump()
public java.lang.String toString()
toString in class java.lang.Objectpublic int append(java.lang.Object value)
value - The value, may be null or PhpNull
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||