|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ha.framework.server.SimpleCachableMarshalledValue
public class SimpleCachableMarshalledValue
Variation on the standard JBoss org.jboss.invocation.MarshalledValue
that only converts the wrapped object to a serialized form during
serialization itself. Allows the marshalled value to be cached without adding
the memory overhead of maintaining a byte[] version of the wrapped object.
Constructor Summary | |
---|---|
SimpleCachableMarshalledValue()
Exposed for externalization. |
|
SimpleCachableMarshalledValue(Serializable obj)
|
|
SimpleCachableMarshalledValue(Serializable obj,
ObjectStreamSource streamSource)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Serializable |
get()
|
ObjectStreamSource |
getObjectStreamSource()
|
int |
hashCode()
Return a hash code for the wrapped object. |
byte[] |
peekSerializedForm()
|
Serializable |
peekUnderlyingObject()
|
void |
readExternal(ObjectInput in)
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
void |
setObjectStreamSource(ObjectStreamSource objectStreamSource)
|
byte[] |
toByteArray()
Serialize any deserialized wrapped object to a byte[] and release any references to the deserialized form. |
String |
toString()
|
void |
writeExternal(ObjectOutput out)
The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleCachableMarshalledValue()
public SimpleCachableMarshalledValue(Serializable obj)
public SimpleCachableMarshalledValue(Serializable obj, ObjectStreamSource streamSource)
Method Detail |
---|
public Serializable get() throws IOException, ClassNotFoundException
get
in interface org.jboss.util.stream.IMarshalledValue
IOException
ClassNotFoundException
public byte[] toByteArray() throws IOException
CachableMarshalledValue
toByteArray
in interface CachableMarshalledValue
null
if there was no wrapped object.
IOException
public Serializable peekUnderlyingObject()
public byte[] peekSerializedForm()
public ObjectStreamSource getObjectStreamSource()
public void setObjectStreamSource(ObjectStreamSource objectStreamSource)
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
in
- the stream to read data from in order to restore the object
IOException
- if I/O errors occur
ClassNotFoundException
- If the class for an object being
restored cannot be found.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- the stream to write the object to
IOException
- Includes any I/O exceptions that may occur
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |