|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.google.gwt.user.client.rpc.SerializationStream
com.google.gwt.user.client.rpc.ClientSerializationStream
For internal use only. Used for server call serialization.
| Field Summary |
| Fields inherited from class com.google.gwt.user.client.rpc.SerializationStream |
flags, NEW_INSTANCE_MARKER, NULL_INSTANCE_MARKER, PREV_INSTANCE_MARKER, SERIALIZATION_STREAM_FLAGS_NO_TYPE_VERSIONING, SERIALIZATION_STREAM_VERSION, version |
| Fields inherited from class java.lang.Object |
typeId, typeName |
| Constructor Summary | |
ClientSerializationStream(Serializer serializer)
|
|
| Method Summary | |
int |
addString(String typeName)
Add a string to this string table. |
void |
append(String token)
Appends a token to the end of the buffer. |
protected void |
clearSeenObjects()
Clears the list of already-seen objects. |
protected void |
clearStringTable()
|
void |
endInstance(SerializationStreamWriter streamWriter,
Object instance)
Mark the end of instance in the stream. |
protected JavaScriptObject |
evalArray(String encoded)
|
String |
extract()
Returns the next token in the decoded stream. |
protected void |
finalize()
Never called. |
protected String |
getInstanceName(String token)
|
SerializationStreamObjectDecoder |
getObjectDecoder()
|
SerializationStreamObjectEncoder |
getObjectEncoder()
|
String |
getString(int token)
Get the string that is associated with the requested index. |
int |
getStringCount()
Get the number of strings in the table. |
StringTable |
getStringTable()
Get the string table associated with this decoder. |
Object |
lookupDecodedObject(String indexToken)
Finds the already-decoded object associated with the given id. |
String |
nextInstance(SerializationStreamReader stream)
Get's the binary name of the next instance in the serialization stream. |
void |
prepareToRead(String encoded)
Call this method before attempting to extract any tokens. |
void |
prepareToWrite()
Call this method before attempting to append any tokens. |
Object |
prevInstance(SerializationStreamReader stream)
See if the next method in the stream is a previously seen method. |
protected int |
privLookupAndRememberAlreadyEncodedObject(Object o,
int hashCode)
Native helper for #encodeObjectPrelude. |
Object |
readObject()
|
void |
rememberDecodedObject(Object o)
Called during decode to allow an object to be coalesced Note that in this case, __seen is treated as an array. |
boolean |
startInstance(SerializationStreamWriter streamWriter,
Object instance)
Called during encode to encode a backref if the object has been seen before. |
String |
toString()
|
void |
writeObject(Object instance)
|
| Methods inherited from class com.google.gwt.user.client.rpc.SerializationStream |
addFlags, getFlags, getVersion, readBoolean, readByte, readChar, readDouble, readFloat, readInt, readLong, readShort, setFlags, setVersion, shouldEnforceTypeVersioning, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeShort |
| Methods inherited from class java.lang.Object |
equals, hashCode |
| Constructor Detail |
public ClientSerializationStream(Serializer serializer)
| Method Detail |
public void append(String token)
append in class SerializationStream
public boolean startInstance(SerializationStreamWriter streamWriter,
Object instance)
true if the caller needs to encode the object (If o
is non-null, never returns true twice).
public void endInstance(SerializationStreamWriter streamWriter,
Object instance)
SerializationStreamObjectEncoder
public String extract()
ClientTokenBuffer#canExtract has just succeeded.
extract in class SerializationStreampublic Object lookupDecodedObject(String indexToken)
indexToken - has leading '#'protected JavaScriptObject evalArray(String encoded)
public void prepareToRead(String encoded)
prepareToRead in class SerializationStreampublic void prepareToWrite()
prepareToWrite in class SerializationStreampublic Object prevInstance(SerializationStreamReader stream)
SerializationStreamObjectDecoder
public String nextInstance(SerializationStreamReader stream)
SerializationStreamObjectDecoder
public void rememberDecodedObject(Object o)
o - - object that we want to be able to recall via prevInstance.public String toString()
protected void clearSeenObjects()
protected void clearStringTable()
public int addString(String typeName)
StringTable
typeName -
public int getStringCount()
StringTable
public String getString(int token)
StringTable
token -
protected void finalize()
throws Throwable
Object
Throwable
protected int privLookupAndRememberAlreadyEncodedObject(Object o,
int hashCode)
#encodeObjectPrelude. If the object has been
seen before, returns its index. If not, returns -1 and remembers the object
in order. Note that in this case, __seen is treated as a map.
o - the object to be remembered.hashCode - the result of calling System.identityHashCode(java.lang.Object) on o.public SerializationStreamObjectDecoder getObjectDecoder()
getObjectDecoder in interface SerializationStreamReadergetObjectDecoder in class SerializationStreampublic SerializationStreamObjectEncoder getObjectEncoder()
getObjectEncoder in interface SerializationStreamWritergetObjectEncoder in class SerializationStreamprotected String getInstanceName(String token)
public Object readObject()
throws SerializationException
SerializationException
public void writeObject(Object instance)
throws SerializationException
SerializationExceptionpublic StringTable getStringTable()
SerializationStreamObjectDecoder
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||