| Modifier and Type | Method and Description |
|---|---|
static AnnotatedEndpoint |
fromClass(Class<?> annotatedClass,
ComponentProviderService componentProvider,
boolean isServerEndpoint,
int incomingBufferSize,
ErrorCollector collector,
EndpointEventListener endpointEventListener)
Create
AnnotatedEndpoint from class. |
static AnnotatedEndpoint |
fromInstance(Object annotatedInstance,
ComponentProviderService componentProvider,
boolean isServerEndpoint,
int incomingBufferSize,
ErrorCollector collector)
Create
AnnotatedEndpoint from instance. |
EndpointConfig |
getEndpointConfig() |
void |
onClose(Session session,
CloseReason closeReason)
This method is called immediately prior to the session with the remote
peer being closed.
|
void |
onError(Session session,
Throwable thr)
Developers may implement this method when the web socket session
creates some kind of error that is not modeled in the web socket protocol.
|
void |
onOpen(Session session,
EndpointConfig configuration)
Developers must implement this method to be notified when a new conversation has
just begun.
|
public static AnnotatedEndpoint fromClass(Class<?> annotatedClass, ComponentProviderService componentProvider, boolean isServerEndpoint, int incomingBufferSize, ErrorCollector collector, EndpointEventListener endpointEventListener)
AnnotatedEndpoint from class.annotatedClass - annotated class.componentProvider - used for instantiating.isServerEndpoint - true iff annotated endpoint is deployed on server side.incomingBufferSize - size limit of the incoming buffer.collector - error collector.endpointEventListener - listener of monitored endpoint events.public static AnnotatedEndpoint fromInstance(Object annotatedInstance, ComponentProviderService componentProvider, boolean isServerEndpoint, int incomingBufferSize, ErrorCollector collector)
AnnotatedEndpoint from instance.annotatedInstance - annotated instance.componentProvider - used for instantiating.isServerEndpoint - true iff annotated endpoint is deployed on server side.incomingBufferSize - size limit of the incoming buffercollector - error collector.public void onClose(Session session, CloseReason closeReason)
Endpointpublic void onError(Session session, Throwable thr)
EndpointThere are a number of categories of exception that this method is (currently) defined to handle:
SessionExceptionsDecodeExceptionspublic EndpointConfig getEndpointConfig()
public void onOpen(Session session, EndpointConfig configuration)
EndpointCopyright © 2012-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.