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 Entry
nextEntry()
String
nextKey()
protected void
read(boolean mandatory, ObjectInputStream ois, Catalog catalog)
void
readHeader(ObjectInputStream objectInputStream, Catalog catalog)
void
write(ObjectOutputStream oos, String key, Object value, Entry.ContextType contextType, EnumSet<PropagationMode> propagationModes, String className)
protected void
write(ObjectOutputStream objectOutputStream, Catalog catalog)
protected void
writeFooter(ObjectOutputStream objectOutputStream)
void
writeHeader(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:
writeHeader
in 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:
write
in classAbstractWireAdapter
- Throws:
IOException
-
readHeader
public void readHeader(ObjectInputStream objectInputStream, Catalog catalog) throws IOException
- Specified by:
readHeader
in classAbstractWireAdapter
- Throws:
IOException
-
nextKey
public String nextKey() throws IOException
- Specified by:
nextKey
in classAbstractWireAdapter
- Throws:
IOException
-
nextEntry
public Entry nextEntry() throws IOException, ClassNotFoundException
- Specified by:
nextEntry
in classAbstractWireAdapter
- Throws:
IOException
ClassNotFoundException
-
writeFooter
protected void writeFooter(ObjectOutputStream objectOutputStream) throws IOException
- Specified by:
writeFooter
in classAbstractWireAdapter
- Throws:
IOException
-
write
protected void write(ObjectOutputStream objectOutputStream, Catalog catalog) throws IOException
- Specified by:
write
in classAbstractWireAdapter
- Throws:
IOException
-
read
protected void read(boolean mandatory, ObjectInputStream ois, Catalog catalog) throws IOException
- Specified by:
read
in classAbstractWireAdapter
- Throws:
IOException
-
-