public class AnnotatedEndpoint
extends javax.websocket.Endpoint
Endpoint
descendant which represents deployed annotated endpoint.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. |
javax.websocket.EndpointConfig |
getEndpointConfig() |
void |
onClose(javax.websocket.Session session,
javax.websocket.CloseReason closeReason) |
void |
onError(javax.websocket.Session session,
Throwable thr) |
void |
onOpen(javax.websocket.Session session,
javax.websocket.EndpointConfig configuration) |
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(javax.websocket.Session session, javax.websocket.CloseReason closeReason)
onClose
in class javax.websocket.Endpoint
public void onError(javax.websocket.Session session, Throwable thr)
onError
in class javax.websocket.Endpoint
public javax.websocket.EndpointConfig getEndpointConfig()
public void onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig configuration)
onOpen
in class javax.websocket.Endpoint
Copyright © 2012-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.