javax.net.websocket.annotations
Annotation Type WebSocketPathParam


@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface WebSocketPathParam

This annotation may be used to annotate method parameters on web socket POJOs where a URI-template has been used in the path-mapping of the WebSocketEndpoint annotation.
For example:- * For example:

 @WebSocketEndpoint("/bookings/{guest-id}");
public class BookingServer {

  @WebSocketMessage
 public void processBookingRequest(@WebSocketPathParam("guest-id") String guestID, String message, Session session) {
   // process booking from the given guest here
 }
}

Author:
dannycoward

Required Element Summary
 String value
          The name of the variable used in the URI-template.
 

Element Detail

value

public abstract String value
The name of the variable used in the URI-template. If the name does not match a path variable in the URI-template, the value of the method parameter this annotation annotates is null.

Returns:
the value


Copyright © 2012. All Rights Reserved.