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 EntrynextEntry()StringnextKey()protected voidread(boolean mandatory, ObjectInputStream ois, Catalog catalog)StringreadAscii()protected voidreadHeader(ObjectInputStream ois, Catalog catalog)static EnumSet<PropagationMode>toPropagationMode(int mode)static inttoWlsPropagationMode(EnumSet<PropagationMode> propagationModes)voidwrite(ObjectOutputStream oos, String key, Object value, Entry.ContextType contextType, EnumSet<PropagationMode> propagationModes, String className)protected voidwrite(ObjectOutputStream oos, Catalog catalog)protected voidwriteFooter(ObjectOutputStream objectOutputStream)protected voidwriteHeader(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:
writein 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:
writeFooterin classAbstractWireAdapter- Throws:
IOException
-
nextKey
public String nextKey() throws IOException
- Specified by:
nextKeyin classAbstractWireAdapter- Throws:
IOException
-
nextEntry
public Entry nextEntry() throws IOException
- Specified by:
nextEntryin classAbstractWireAdapter- Throws:
IOException
-
readAscii
public String readAscii() throws IOException
- Throws:
IOException
-
writeHeader
protected void writeHeader(ObjectOutputStream oos) throws IOException
- Specified by:
writeHeaderin classAbstractWireAdapter- Throws:
IOException
-
readHeader
protected void readHeader(ObjectInputStream ois, Catalog catalog) throws IOException
- Specified by:
readHeaderin classAbstractWireAdapter- Throws:
IOException
-
write
protected void write(ObjectOutputStream oos, 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
-
-