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)
Endpoint
public void onError(Session session, java.lang.Throwable thr)
Endpoint
There are a number of categories of exception that this method is (currently) defined to handle:
SessionException
sDecodeException
spublic EndpointConfig getEndpointConfig()
public void onOpen(Session session, EndpointConfig configuration)
Endpoint
Note:
MessageHandler
s from this method. No messages will be
mapped to the appropriate MessageHandler
until this method has completed.Copyright © 2012–2020 Oracle Corporation. All rights reserved.