javax.net.websocket.annotations
Annotation Type WebSocketEndpoint


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface WebSocketEndpoint

This class level annotation declares that the class it decorates is a web socket endpoint.

Since:
Draft 002
Author:
dannycoward

Required Element Summary
 String path
          The relative URI where the endpoint will be deployed, for example '/chat'
 
Optional Element Summary
 Class[] decoders
          The ordered array of decoder classes this endpoint will need to use.
 Class[] encoders
          The ordered array of encoder classes this endpoint will need to use.
 String[] subprotocols
          The ordered array of web socket protocols this endpoint supports.
 

Element Detail

path

public abstract String path
The relative URI where the endpoint will be deployed, for example '/chat'

subprotocols

public abstract String[] subprotocols
The ordered array of web socket protocols this endpoint supports. For example, {'superchat', 'chat'}.

Default:
{}

decoders

public abstract Class[] decoders
The ordered array of decoder classes this endpoint will need to use. For example, if the developer have provided a MysteryObject decoder, this class will be able to send MysteryObjects as web socket messages.

Default:
{}

encoders

public abstract Class[] encoders
The ordered array of encoder classes this endpoint will need to use. For example, if the developer have provided a MysteryObject encoder, this class will be able to receive web socket messages in the form of MysteryObjects.

Default:
{}


Copyright © 2012. All Rights Reserved.