public class UnreliableObjectOutputStream extends ObjectOutputStream
ObjectOutputStream for use in unreliable channels, where we must transmit class
mappings with every object until we are explicitly notified that the receiver has cached the
mappings.| Constructor and Description |
|---|
UnreliableObjectOutputStream(OutputStream target)
Constructs an object output stream which will write its data to the supplied target stream.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Class<?>> |
getMappedClasses()
Returns a reference to the set of classes for which mappings have been written.
|
Set<String> |
getMappedInterns()
Returns a reference to the set of pooled strings for which mappings have been written.
|
void |
noteClassMappingsReceived(Collection<Class<?>> sclasses)
Notes that the receiver has received the mappings for a group of classes and thus that from
now on, only the codes need be sent.
|
void |
noteInternMappingsReceived(Collection<String> sinterns)
Notes that the receiver has received the mappings for a group of interns and thus that from
now on, only the codes need be sent.
|
void |
setMappedClasses(Set<Class<?>> mappedClasses)
Sets the reference to the set that will hold the classes for which mappings have been
written.
|
void |
setMappedInterns(Set<String> mappedInterns)
Sets the reference to the set that will hold the pooled strings for which mappings have been
written.
|
addTranslation, defaultWriteObject, writeBareObject, writeIntern, writeObject, writeUnmodifiedUTFflush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFclose, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritepublic UnreliableObjectOutputStream(OutputStream target)
public void setMappedClasses(Set<Class<?>> mappedClasses)
public Set<Class<?>> getMappedClasses()
public void setMappedInterns(Set<String> mappedInterns)
public Set<String> getMappedInterns()
public void noteClassMappingsReceived(Collection<Class<?>> sclasses)
public void noteInternMappingsReceived(Collection<String> sinterns)
Copyright © 2015. All rights reserved.