CALL
- is the generic type of the RemoteInvocationCall
.public abstract class GenericRemoteInvocationCallHandler<CALL extends RemoteInvocationCall> extends Object implements AttributeReadId<String>
invoke
RemoteInvocationCall
s from the client on the server-side.Modifier and Type | Field and Description |
---|---|
private AbstractGenericRemoteInvocationService<?,?,?,?> |
genericService |
private String |
id |
private Boolean |
login |
private Boolean |
secured |
Constructor and Description |
---|
GenericRemoteInvocationCallHandler(String id,
AbstractGenericRemoteInvocationService<?,?,?,?> genericService)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Set<? extends javax.validation.ConstraintViolation<?>> |
doValidate(CALL call)
Called from
validate(RemoteInvocationCall) to delegate to JSR303 (javax.validation). |
AbstractGenericRemoteInvocationService<?,?,?,?> |
getGenericService() |
String |
getId()
This method gets the ID used to identify this object.
|
protected abstract Method |
getServiceMethod() |
protected void |
handleConstraintViolations(Set<javax.validation.ConstraintViolation<?>> violations)
Handles the result of a
validation . |
abstract Object |
invoke(CALL call)
Invokes the given
RemoteInvocationCall . |
boolean |
isLogin() |
boolean |
isSecured() |
String |
toString() |
void |
validate(CALL call)
Performs a (pre-)validation of the given
RemoteInvocationCall . |
private Boolean secured
isSecured()
private final AbstractGenericRemoteInvocationService<?,?,?,?> genericService
getGenericService()
public GenericRemoteInvocationCallHandler(String id, AbstractGenericRemoteInvocationService<?,?,?,?> genericService)
id
- - see getId()
.genericService
- - see getGenericService()
.public AbstractGenericRemoteInvocationService<?,?,?,?> getGenericService()
generic remote invocation service
.public String getId()
getId
in interface AttributeReadId<String>
public boolean isLogin()
true
if login operation, false
otherwise.RemoteInvocationSecurityDetector.isLogin(java.lang.reflect.AnnotatedElement)
protected abstract Method getServiceMethod()
Method
of the remote invocation.public boolean isSecured()
true
if secured operation, false
otherwise.RemoteInvocationSecurityDetector.isSecured(java.lang.reflect.AnnotatedElement)
public abstract Object invoke(CALL call) throws Exception
RemoteInvocationCall
.call
- is the RemoteInvocationCall
to execute.Exception
- if anything goes wrong.public void validate(CALL call) throws Exception
RemoteInvocationCall
. Will typically be called outside a
transaction. Complex business and state validation that requires a transaction has to be performed inside
the actual invocation
.call
- is the RemoteInvocationCall
to validate.Exception
- if the given call
is invalid.protected abstract Set<? extends javax.validation.ConstraintViolation<?>> doValidate(CALL call)
validate(RemoteInvocationCall)
to delegate to JSR303 (javax.validation).call
- is the RemoteInvocationCall
to validate.Set
of ConstraintViolation
s. Will be empty
if valid.protected void handleConstraintViolations(Set<javax.validation.ConstraintViolation<?>> violations)
validation
.violations
- is the Set
of ConstraintViolation
s.Copyright © 2001–2016 mmm-Team. All rights reserved.