| Modifier and Type | Method and Description |
|---|---|
static AnnotatedEndpoint |
fromClass(java.lang.Class<?> annotatedClass,
ComponentProviderService componentProvider,
boolean isServerEndpoint,
int incomingBufferSize,
ErrorCollector collector,
EndpointEventListener endpointEventListener)
Create
AnnotatedEndpoint from class. |
static AnnotatedEndpoint |
fromClass(java.lang.Class<?> annotatedClass,
ComponentProviderService componentProvider,
boolean isServerEndpoint,
int incomingBufferSize,
ErrorCollector collector,
EndpointEventListener endpointEventListener,
java.util.Set<Extension> extensions)
Create
AnnotatedEndpoint from class. |
static AnnotatedEndpoint |
fromInstance(java.lang.Object annotatedInstance,
ComponentProviderService componentProvider,
boolean isServerEndpoint,
int incomingBufferSize,
ErrorCollector collector)
Create
AnnotatedEndpoint from instance. |
static AnnotatedEndpoint |
fromInstance(java.lang.Object annotatedInstance,
ComponentProviderService componentProvider,
boolean isServerEndpoint,
int incomingBufferSize,
ErrorCollector collector,
java.util.Set<Extension> extensions)
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,
java.lang.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(java.lang.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 fromClass(java.lang.Class<?> annotatedClass, ComponentProviderService componentProvider, boolean isServerEndpoint, int incomingBufferSize, ErrorCollector collector, EndpointEventListener endpointEventListener, java.util.Set<Extension> extensions)
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.extensions - installed extentions.public static AnnotatedEndpoint fromInstance(java.lang.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 static AnnotatedEndpoint fromInstance(java.lang.Object annotatedInstance, ComponentProviderService componentProvider, boolean isServerEndpoint, int incomingBufferSize, ErrorCollector collector, java.util.Set<Extension> extensions)
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.extensions - installed extentions.public void onClose(Session session, CloseReason closeReason)
Endpointpublic void onError(Session session, java.lang.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–2025 Oracle Corporation. All rights reserved.