@Target(value=TYPE) @Retention(value=RUNTIME) @Inherited public @interface GenDispatch
@GenDispatch
public class RetrieveFoo {
@In(1) Key fooKey;
@Out(1) Foo foo;
@Out(2) boolean bar;
}
gwt-platform will generate two classes, RetrieveFooAction and
RetrieveFooResult.
@In
specifies that fooKey will only be used in the action. The
number passed to @In specifies the order of the arguments to the constructor.
@Out
specifies that foo and bar will only be used in the result.
The number passed to @Out specifies the order of the arguments to the
constructor.
RetrieveFooAction will have fields, getters, and a constructor for fooKey,
plus equals, hashCode, toString etc, for it to function correctly as an
Action.
RetrieveFooResult will have fields, getters, and a constructor that accepts
food and good, for bar, plus equals, hashCode, toString etc, for it to
function correctly as an Result.
Complex example:
public interface HasThing<T> {
T getThing();
}
@GenDispatch(
isSecure = false,
serviceName = Action.DEFAULT_SERVICE_NAME + "MyBar",
extraResultInterfaces = "com.example.shared.HasThing<com.example.shared.Foo>"
)
public class RetrieveBar {
@In(1) String id;
@Out(1) Foo thing;
}
UpdateBarAction will have the following features;
isSecured
Specifies the value that the generated isSecured() method
should return. Defaults to true if not specified. See
Action
for more details.
serviceName
Specifies the value that the generated getServiceName()
method should return. Defaults to Action.DEFAULT_SERVICE_NAME +
"YourClassName" if not specified. See
Action
for more details.
extraActionInterfaces
A comma separated list of fully qualified
interfaces that the Action class will implement. Each of the
functions defined in the interface must match an function
autogenerated using the field definitions.
extraResultInterfaces
A comma separated list of fully qualified
interfaces that the Result class will implement. Each of the
functions defined in the interface must match an function
autogenerated using the field definitions.Modifier and Type | Optional Element and Description |
---|---|
String |
extraActionInterfaces |
String |
extraResultInterfaces |
boolean |
isSecure |
String |
serviceName |
Copyright © 2010-2014 ArcBees. All Rights Reserved.