|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.net.websocket.Endpoint
public abstract class Endpoint
The Web Socket Endpoint represents and object that can handle web socket conversations. If deployed as a server, that is to say, the endpoint is registered to a URL, the endpoint may handle one or more web socket conversations, one for each client that establishes a connection. If deployed as a client, the endpoint will participate in only one conversation: that with the server to which it connects. If the endpoint is a server which will cater to multiple clients, the endpoint may be called by multiple threads, no more than one per client, at any one time. This means that when implementing/overriding the methods of Endpoint, the developer should be aware that any state management must be carefully synchronized with this in mine.
| Constructor Summary | |
|---|---|
Endpoint()
|
|
| Method Summary | |
|---|---|
void |
onClose(Session session)
Developers may implement this method to be notified when an active conversation has just been terminated. |
void |
onError(Throwable thr,
Session s)
Developers may implement this method when a web socket connection, represented by the session, creates some kind of error that is not modeled in the web socket protocol. |
abstract void |
onOpen(Session session)
Developers may implement this method to be notified when a new conversation has just begun. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Endpoint()
| Method Detail |
|---|
public abstract void onOpen(Session session)
session - public void onClose(Session session)
session -
public void onError(Throwable thr,
Session s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||