[Java] Annotation Type r1.rpc.RPCInterceptor |
Server API |
r1.rpc.aop
Annotation Type RPCInterceptor
@Retention(value=RUNTIME) @Target(value={METHOD,TYPE}) public @interface RPCInterceptor
This annotation enables aspect-oriented programming (AOP) for the server-side façade classes. It can be used at both class and method levels. If a value is specified at the method level, it overrides the one set at the class level, if any. So you can set an overall intercept policy for the whole class and fine-tune at method level.
The R1-RPC/J runtime provides a built-in authentication
service. When checkAuthentication is set to "yes", prior
to calling the method, the existence of the user object in the
session is checked; if that object is not found, meaning the user is
not logged in yet, a login exception is thrown. The
checkAuthentication value can also be the name of a
class that implements the r1.rpc.aop.RPCAuthenticator
interface, which typically implements more complicated authentication
logic than just checking login status.
In addition to authentication check, when a remote call request
is made, you can intercept and handle events for before the call,
after the call and a thrown exception by supplying an interceptor
class name in handler.
- See Also:
r1.rpc.WebTierUtils,RPCCallInterceptor
| Optional Element Summary | |
|---|---|
java.lang.String |
checkAuthentication
Valid values are: default, yes,
no, or a class name that implements
r1.rpc.aop.RPCAuthenticator. |
java.lang.String |
handler
Valid values are: none or the name of a class
that implements r1.rpc.aop.RPCCallInterceptor. |
checkAuthentication
public abstract java.lang.String checkAuthentication
- Valid values are:
default,yes,no, or a class name that implementsr1.rpc.aop.RPCAuthenticator.- Default:
- "yes"
handler
public abstract java.lang.String handler
- Valid values are:
noneor the name of a class that implementsr1.rpc.aop.RPCCallInterceptor.- Default:
- "none"