|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageCodecHelperObjectStreamAttributeController
Attribute controller interface for
MessageCodecHelperObjectStreamImpl
message codec helper component.
Defines a reuseObjectStream
boolean attribute that control the
"life cycle" of the object streams used by the codec. If false
,
the codec will open a new Object stream for each encoding or decoding
operation. Else, the codec resuse the already opened Object stream (see
CodecInputOutput.setInput(Object)
and
CodecInputOutput.setOutput(Object)
).
Warning : if true
, you must be sure that the
ObjectOutputStream.writeObject(Object)
(respectivly
readObject
) method is never used, unless a memory leak can
happen. Inded, the writeObject
method keeps a reference to
each serialized object. You must use the
Util.writeObject(java.io.ObjectOutput, Object)
(respectivly,
Util.readObject(java.io.ObjectInput)
)
instead. This method will use the
ObjectOutputStream.writeUnshared(Object)
method
(respectivly, ObjectInputStream.readUnshared()
).
To do so, you must implements specialized serialization method in your chunk
and message implementations, and in any serialized object.
Serializable
,
Externalizable
,
ObjectOutputStream
,
ObjectInputStream
Method Summary | |
---|---|
boolean |
getReuseObjectStream()
Returns the reuseObjectStream attribute value. |
void |
setReuseObjectStream(boolean reuseObjectStream)
Sets the reuseObjectStream attribute. |
Method Detail |
---|
boolean getReuseObjectStream()
reuseObjectStream
attribute value.
reuseObjectStream
attribute value.void setReuseObjectStream(boolean reuseObjectStream)
reuseObjectStream
attribute.
reuseObjectStream
- the new reuseObjectStream
attribute
value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |