source: trunk/src/main/java/omq/client/annotation/SyncMethod.java

Last change on this file was 82, checked in by stoda, 11 years ago

I've done some javadocs...

File size: 902 bytes
Line 
1package omq.client.annotation;
2
3import java.lang.annotation.ElementType;
4import java.lang.annotation.Retention;
5import java.lang.annotation.RetentionPolicy;
6import java.lang.annotation.Target;
7
8/**
9 * Annotation which indicates a method as Synchronous. It can have two
10 * parameters: timeout and retry which will give you how long you have to wait a
11 * synchronous method and how many times you'll wait for the response.
12 *
13 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
14 *
15 */
16@Retention(RetentionPolicy.RUNTIME)
17@Target(ElementType.METHOD)
18public @interface SyncMethod {
19        /**
20         * Timeout of a synchronous method
21         *
22         * @return how long we'll wait for a response
23         */
24        long timeout() default 60000L;
25
26        /**
27         * Number of retries of a synchronous method
28         *
29         * @return how many retries we'll make. If the timeout is set, every timeout
30         *         will use it
31         */
32        int retry() default 1;
33}
Note: See TracBrowser for help on using the repository browser.