Class DefaultWireAdapter
- java.lang.Object
-
- org.glassfish.contextpropagation.wireadapters.AbstractWireAdapter
-
- org.glassfish.contextpropagation.wireadapters.glassfish.DefaultWireAdapter
-
- All Implemented Interfaces:
WireAdapter
public class DefaultWireAdapter extends AbstractWireAdapter
This wire adapter implementation produces a compact wire format that starts with a catalog. It minimizes the amount of metadata sent over the wire. The metadata necessary to rehydrate the objects is either hardwired or available in registries.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.contextpropagation.wireadapters.WireAdapter
WireAdapter.WireAdapterHelper
-
-
Field Summary
-
Fields inherited from class org.glassfish.contextpropagation.wireadapters.AbstractWireAdapter
key, ois, READ_LIMIT
-
Fields inherited from interface org.glassfish.contextpropagation.wireadapters.WireAdapter
HELPER
-
-
Constructor Summary
Constructors Constructor Description DefaultWireAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntrynextEntry()StringnextKey()protected voidread(boolean mandatory, ObjectInputStream ois, Catalog catalog)voidreadHeader(ObjectInputStream objectInputStream, Catalog catalog)voidwrite(ObjectOutputStream oos, String key, Object value, Entry.ContextType contextType, EnumSet<PropagationMode> propagationModes, String className)protected voidwrite(ObjectOutputStream objectOutputStream, Catalog catalog)protected voidwriteFooter(ObjectOutputStream objectOutputStream)voidwriteHeader(ObjectOutputStream oos)-
Methods inherited from class org.glassfish.contextpropagation.wireadapters.AbstractWireAdapter
flush, prepareToReadFrom, prepareToWriteTo, readEntry, readKey, write
-
-
-
-
Method Detail
-
writeHeader
public void writeHeader(ObjectOutputStream oos) throws IOException
- Specified by:
writeHeaderin classAbstractWireAdapter- Throws:
IOException
-
write
public void write(ObjectOutputStream oos, String key, Object value, Entry.ContextType contextType, EnumSet<PropagationMode> propagationModes, String className) throws IOException
- Specified by:
writein classAbstractWireAdapter- Throws:
IOException
-
readHeader
public void readHeader(ObjectInputStream objectInputStream, Catalog catalog) throws IOException
- Specified by:
readHeaderin classAbstractWireAdapter- Throws:
IOException
-
nextKey
public String nextKey() throws IOException
- Specified by:
nextKeyin classAbstractWireAdapter- Throws:
IOException
-
nextEntry
public Entry nextEntry() throws IOException, ClassNotFoundException
- Specified by:
nextEntryin classAbstractWireAdapter- Throws:
IOExceptionClassNotFoundException
-
writeFooter
protected void writeFooter(ObjectOutputStream objectOutputStream) throws IOException
- Specified by:
writeFooterin classAbstractWireAdapter- Throws:
IOException
-
write
protected void write(ObjectOutputStream objectOutputStream, Catalog catalog) throws IOException
- Specified by:
writein classAbstractWireAdapter- Throws:
IOException
-
read
protected void read(boolean mandatory, ObjectInputStream ois, Catalog catalog) throws IOException- Specified by:
readin classAbstractWireAdapter- Throws:
IOException
-
-