Class WLSWireAdapter
- java.lang.Object
-
- org.glassfish.contextpropagation.wireadapters.AbstractWireAdapter
-
- org.glassfish.contextpropagation.wireadapters.wls.WLSWireAdapter
-
- All Implemented Interfaces:
WireAdapter
public class WLSWireAdapter extends AbstractWireAdapter
This WireAdapter implementation is compatible with the wire format from Web Logic Server 12.2 and earlier. It provides limited support for primitive types other than Long, String, and ASCII String. These other primitive types are wrapped inside weblogic.workarea.SerializableWorkContext$Carrier. A catalog is also wrapped inside a SerializableContext. This catalog may not be of any use to a WLS process, however it may be of use to another Glassfish process which may receive it directly or through a WLS process. The catalog is useful to interpret contexts that may not have been written by WLS or if the catalog is read by glassfish (we can use the WLS wire format between two glassfish instances as well as between glassfish and WLS instances).
-
-
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 WLSWireAdapter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Entry
nextEntry()
String
nextKey()
protected void
read(boolean mandatory, ObjectInputStream ois, Catalog catalog)
String
readAscii()
protected void
readHeader(ObjectInputStream ois, Catalog catalog)
static EnumSet<PropagationMode>
toPropagationMode(int mode)
static int
toWlsPropagationMode(EnumSet<PropagationMode> propagationModes)
void
write(ObjectOutputStream oos, String key, Object value, Entry.ContextType contextType, EnumSet<PropagationMode> propagationModes, String className)
protected void
write(ObjectOutputStream oos, Catalog catalog)
protected void
writeFooter(ObjectOutputStream objectOutputStream)
protected void
writeHeader(ObjectOutputStream oos)
-
Methods inherited from class org.glassfish.contextpropagation.wireadapters.AbstractWireAdapter
flush, prepareToReadFrom, prepareToWriteTo, readEntry, readKey, write
-
-
-
-
Method Detail
-
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
-
toWlsPropagationMode
public static int toWlsPropagationMode(EnumSet<PropagationMode> propagationModes)
-
toPropagationMode
public static EnumSet<PropagationMode> toPropagationMode(int mode)
-
writeFooter
protected void writeFooter(ObjectOutputStream objectOutputStream) throws IOException
- Specified by:
writeFooter
in classAbstractWireAdapter
- Throws:
IOException
-
nextKey
public String nextKey() throws IOException
- Specified by:
nextKey
in classAbstractWireAdapter
- Throws:
IOException
-
nextEntry
public Entry nextEntry() throws IOException
- Specified by:
nextEntry
in classAbstractWireAdapter
- Throws:
IOException
-
readAscii
public String readAscii() throws IOException
- Throws:
IOException
-
writeHeader
protected void writeHeader(ObjectOutputStream oos) throws IOException
- Specified by:
writeHeader
in classAbstractWireAdapter
- Throws:
IOException
-
readHeader
protected void readHeader(ObjectInputStream ois, Catalog catalog) throws IOException
- Specified by:
readHeader
in classAbstractWireAdapter
- Throws:
IOException
-
write
protected void write(ObjectOutputStream oos, 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
-
-