001// ***************************************************************************************************************************
002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
003// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
005// * with the License.  You may obtain a copy of the License at                                                              *
006// *                                                                                                                         *
007// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
008// *                                                                                                                         *
009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
011// * specific language governing permissions and limitations under the License.                                              *
012// ***************************************************************************************************************************
013package org.apache.juneau.remoteable;
014
015import static java.lang.annotation.ElementType.*;
016import static java.lang.annotation.RetentionPolicy.*;
017
018import java.lang.annotation.*;
019
020/**
021 * @deprecated Use {@link org.apache.juneau.rest.client.remote#RemoteResource}
022 */
023@SuppressWarnings("javadoc")
024@Deprecated
025@Documented
026@Target({TYPE,METHOD})
027@Retention(RUNTIME)
028@Inherited
029public @interface Remoteable {
030
031   /**
032    * The absolute or relative path of the REST service.
033    *
034    * <p>
035    * When a relative path is specified, it's relative to the root-url defined on the <code>RestClient</code> used
036    * to instantiate the interface.
037    *
038    * <p>
039    * When no path is specified, the path is assumed to be the class name (e.g.
040    * <js>"http://localhost/root-url/org.foo.MyInterface"</js>)
041    */
042   String path() default "";
043
044   /**
045    * Identifies which methods on the interface should be exposed through the proxy.
046    *
047    * <p>
048    * The options are:
049    * <ul>
050    *    <li><js>"DECLARED"</js> (default) - Only methods declared on the immediate interface/class are exposed.
051    *       Methods on parent interfaces/classes are ignored.
052    *    <li><js>"ANNOTATED"</js> - Only methods annotated with {@link RemoteMethod} are exposed.
053    *    <li><js>"ALL"</js> - All methods defined on the interface or class are exposed.
054    * </ul>
055    */
056   String expose() default "DECLARED";
057
058   /**
059    * Defines the methodology to use for the path names of the methods when not explicitly defined via
060    * {@link RemoteMethod#path() @RemoteMethod.path()}.
061    *
062    * <p>
063    * The options are:
064    * <ul>
065    *    <li><js>"NAME"</js> (default) - Use the method name (e.g. "myMethod").
066    *    <li><js>"SIGNATURE"</js> - Use the method signature (e.g. "myMethod(int,boolean,java.lang.String,int[][][])").
067    * </ul>
068    * <p>
069    * Note that if you use <js>"NAME"</js>, method names must be unique in the interface.
070    */
071   String methodPaths() default "NAME";
072}