Modifier and Type | Method and Description |
---|---|
static AnnotatedEndpoint |
fromClass(Class<?> annotatedClass,
ComponentProviderService componentProvider,
boolean isServerEndpoint,
ErrorCollector collector)
Create
AnnotatedEndpoint from class. |
static AnnotatedEndpoint |
fromInstance(Object annotatedInstance,
ComponentProviderService componentProvider,
boolean isServerEndpoint,
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, ErrorCollector collector)
AnnotatedEndpoint
from class.annotatedClass
- annotated class.componentProvider
- used for instantiating.isServerEndpoint
- true
iff annotated endpoint is deployed on server side.collector
- error collector.public static AnnotatedEndpoint fromInstance(Object annotatedInstance, ComponentProviderService componentProvider, boolean isServerEndpoint, ErrorCollector collector)
AnnotatedEndpoint
from instance.annotatedInstance
- annotated instance.componentProvider
- used for instantiating.isServerEndpoint
- true
iff annotated endpoint is deployed on server side.collector
- error collector.public void onClose(Session session, CloseReason closeReason)
Endpoint
public void onError(Session session, 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
Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.