Package org.glassfish.tyrus.core.coder
Class CoderWrapper<T>
java.lang.Object
org.glassfish.tyrus.core.coder.CoderAdapter
org.glassfish.tyrus.core.coder.CoderWrapper<T>
Wrapper of coders storing the coder coder class (and optionally coder instance), return type of the encode / decode
method and coder class.
- Author:
- Stepan Kopriva, Pavel Bucek
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.websocket.Decoder
Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>
Nested classes/interfaces inherited from interface jakarta.websocket.Encoder
Encoder.Binary<T>, Encoder.BinaryStream<T>, Encoder.Text<T>, Encoder.TextStream<T>
-
Constructor Summary
ConstructorDescriptionCoderWrapper
(Class<? extends T> coderClass, Class<?> type) Construct new coder wrapper.CoderWrapper
(T coder, Class<?> type) Construct new coder wrapper. -
Method Summary
Methods inherited from class org.glassfish.tyrus.core.coder.CoderAdapter
destroy, init
-
Constructor Details
-
CoderWrapper
Construct new coder wrapper.- Parameters:
coderClass
- coder class.type
- return type provided by the encode / decode method. Cannot benull
.
-
CoderWrapper
Construct new coder wrapper.- Parameters:
coder
- cannot benull
.type
- return type provided by the encode / decode method. Cannot benull
.
-
-
Method Details
-
getType
Get the return type of the encode / decode method.- Returns:
- return type of the encode / decode method.
-
getCoderClass
Get coder class.- Returns:
- coder class.
-
getCoder
Get coder instance.- Returns:
- coder instance.
null
if registered using coder class.
-
toString
-