All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.net.websocket.annotations.WebSocketPathParam Maven / Gradle / Ivy

There is a newer version: 1.0-b08
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javax.net.websocket.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 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 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.PARAMETER) public @interface WebSocketPathParam { /** 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. @return the value */ public String value(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy