Class JsrEvents<T extends java.lang.annotation.Annotation,C extends javax.websocket.EndpointConfig>
- java.lang.Object
-
- org.eclipse.jetty.websocket.jsr356.annotations.JsrEvents<T,C>
-
- Type Parameters:
T
- the annotation typeC
- the endpoint config type
public class JsrEvents<T extends java.lang.annotation.Annotation,C extends javax.websocket.EndpointConfig> extends java.lang.Object
The live event methods found for a specific Annotated Endpoint
-
-
Field Summary
Fields Modifier and Type Field Description private static org.eclipse.jetty.util.log.Logger
LOG
private AnnotatedEndpointMetadata<T,C>
metadata
private OnMessageBinaryCallable
onBinary
Callable for @OnMessage
annotation dealing with Binary Message Formatprivate OnMessageBinaryStreamCallable
onBinaryStream
Callable for @OnMessage
annotation dealing with Binary Streaming Message Formatprivate OnCloseCallable
onClose
Callable for @OnClose
annotationprivate OnErrorCallable
onError
Callable for @OnError
annotationprivate OnOpenCallable
onOpen
Callable for @OnOpen
annotation.private OnMessagePongCallable
onPong
Callable for @OnMessage
annotation dealing with Pong Message Formatprivate OnMessageTextCallable
onText
Callable for @OnMessage
annotation dealing with Text Message Formatprivate OnMessageTextStreamCallable
onTextStream
Callable for @OnMessage
annotation dealing with Text Streaming Message Formatprivate java.util.Map<java.lang.String,java.lang.String>
pathParameters
The Request Parameters (from resolved javax.websocket.server.PathParam entries)
-
Constructor Summary
Constructors Constructor Description JsrEvents(AnnotatedEndpointMetadata<T,C> metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
callBinary(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.nio.ByteBuffer buf, boolean fin)
void
callBinaryStream(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.io.InputStream stream)
void
callClose(java.lang.Object websocket, javax.websocket.CloseReason close)
void
callError(java.lang.Object websocket, java.lang.Throwable cause)
void
callOpen(java.lang.Object websocket, javax.websocket.EndpointConfig config)
void
callPong(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.nio.ByteBuffer pong)
void
callText(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.lang.String text, boolean fin)
void
callTextStream(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.io.Reader reader)
AnnotatedEndpointMetadata<T,C>
getMetadata()
boolean
hasBinary()
boolean
hasBinaryStream()
boolean
hasText()
boolean
hasTextStream()
void
init(JsrSession session)
boolean
isBinaryPartialSupported()
boolean
isTextPartialSupported()
void
setPathParameters(java.util.Map<java.lang.String,java.lang.String> pathParameters)
-
-
-
Field Detail
-
LOG
private static final org.eclipse.jetty.util.log.Logger LOG
-
metadata
private final AnnotatedEndpointMetadata<T extends java.lang.annotation.Annotation,C extends javax.websocket.EndpointConfig> metadata
-
onOpen
private final OnOpenCallable onOpen
Callable for @OnOpen
annotation.
-
onClose
private final OnCloseCallable onClose
Callable for @OnClose
annotation
-
onError
private final OnErrorCallable onError
Callable for @OnError
annotation
-
onText
private final OnMessageTextCallable onText
Callable for @OnMessage
annotation dealing with Text Message Format
-
onTextStream
private final OnMessageTextStreamCallable onTextStream
Callable for @OnMessage
annotation dealing with Text Streaming Message Format
-
onBinary
private final OnMessageBinaryCallable onBinary
Callable for @OnMessage
annotation dealing with Binary Message Format
-
onBinaryStream
private final OnMessageBinaryStreamCallable onBinaryStream
Callable for @OnMessage
annotation dealing with Binary Streaming Message Format
-
onPong
private OnMessagePongCallable onPong
Callable for @OnMessage
annotation dealing with Pong Message Format
-
pathParameters
private java.util.Map<java.lang.String,java.lang.String> pathParameters
The Request Parameters (from resolved javax.websocket.server.PathParam entries)
-
-
Constructor Detail
-
JsrEvents
public JsrEvents(AnnotatedEndpointMetadata<T,C> metadata)
-
-
Method Detail
-
callBinary
public void callBinary(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.nio.ByteBuffer buf, boolean fin) throws javax.websocket.DecodeException
- Throws:
javax.websocket.DecodeException
-
callBinaryStream
public void callBinaryStream(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.io.InputStream stream) throws javax.websocket.DecodeException, java.io.IOException
- Throws:
javax.websocket.DecodeException
java.io.IOException
-
callClose
public void callClose(java.lang.Object websocket, javax.websocket.CloseReason close)
-
callError
public void callError(java.lang.Object websocket, java.lang.Throwable cause)
-
callOpen
public void callOpen(java.lang.Object websocket, javax.websocket.EndpointConfig config)
-
callPong
public void callPong(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.nio.ByteBuffer pong)
-
callText
public void callText(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.lang.String text, boolean fin) throws javax.websocket.DecodeException
- Throws:
javax.websocket.DecodeException
-
callTextStream
public void callTextStream(javax.websocket.RemoteEndpoint.Async endpoint, java.lang.Object websocket, java.io.Reader reader) throws javax.websocket.DecodeException, java.io.IOException
- Throws:
javax.websocket.DecodeException
java.io.IOException
-
getMetadata
public AnnotatedEndpointMetadata<T,C> getMetadata()
-
hasBinary
public boolean hasBinary()
-
hasBinaryStream
public boolean hasBinaryStream()
-
hasText
public boolean hasText()
-
hasTextStream
public boolean hasTextStream()
-
init
public void init(JsrSession session)
-
isBinaryPartialSupported
public boolean isBinaryPartialSupported()
-
isTextPartialSupported
public boolean isTextPartialSupported()
-
setPathParameters
public void setPathParameters(java.util.Map<java.lang.String,java.lang.String> pathParameters)
-
-