@ApplicationScoped public class ServiceOperationInvoker extends Object
ServiceTunnelRequest
and to return the
operations result in the form of a ServiceTunnelResponse
.Constructor and Description |
---|
ServiceOperationInvoker() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkRemoteServiceAccessByAnnotations(Class<?> interfaceClass,
Class<?> implClass,
Method interfaceMethod,
Object[] args)
Check pass 2 on instance
|
protected void |
checkRemoteServiceAccessByInterface(Class<?> interfaceClass,
Method interfaceMethod,
Object[] args)
Check pass 1 on type
|
protected void |
checkRemoteServiceAccessByPermission(Class<?> interfaceClass,
Class<?> implClass,
Method interfaceMethod,
Object[] args)
Check pass 3
RemoteServiceAccessPermission if a client (gui) is allowed to call this service from remote
using a remote service proxy. |
protected void |
checkServiceAvailable(Class<?> serviceInterfaceClass,
Object service)
Check, if an instance is available
|
protected Object |
getValidatedServiceAccess(Class<?> serviceInterfaceClass,
Method serviceOp,
Object[] args)
Check, if the service can be accessed
|
protected void |
handleException(Throwable t)
Method invoked to handle a service exception.
|
protected Throwable |
interceptException(Throwable t)
Method invoked to intercept a service exception before being put into the
ServiceTunnelResponse to be sent
to the client. |
ServiceTunnelResponse |
invoke(org.eclipse.scout.rt.platform.context.RunContext runContext,
ServiceTunnelRequest serviceReq)
Invoke the service associated with the
ServiceTunnelRequest . |
protected ServiceTunnelResponse |
invokeInternal(ServiceTunnelRequest serviceReq) |
protected boolean |
mustAuthorize(Class<?> interfaceClass,
Class<?> implClass,
Method interfaceMethod,
Object[] args) |
public ServiceTunnelResponse invoke(org.eclipse.scout.rt.platform.context.RunContext runContext, ServiceTunnelRequest serviceReq)
ServiceTunnelRequest
. protected ServiceTunnelResponse invokeInternal(ServiceTunnelRequest serviceReq) throws ClassNotFoundException
ClassNotFoundException
protected Object getValidatedServiceAccess(Class<?> serviceInterfaceClass, Method serviceOp, Object[] args)
protected void checkServiceAvailable(Class<?> serviceInterfaceClass, Object service)
protected void checkRemoteServiceAccessByInterface(Class<?> interfaceClass, Method interfaceMethod, Object[] args)
protected void checkRemoteServiceAccessByAnnotations(Class<?> interfaceClass, Class<?> implClass, Method interfaceMethod, Object[] args)
Using blacklist RemoteServiceAccessDenied
protected void checkRemoteServiceAccessByPermission(Class<?> interfaceClass, Class<?> implClass, Method interfaceMethod, Object[] args)
RemoteServiceAccessPermission
if a client (gui) is allowed to call this service from remote
using a remote service proxy.
Deny access by default.
Accepts when a RemoteServiceAccessPermission
was implied or authorization was waved using whitelist
RemoteServiceWithoutAuthorization
in mustAuthorize(Class, Class, Method, Object[])
protected boolean mustAuthorize(Class<?> interfaceClass, Class<?> implClass, Method interfaceMethod, Object[] args)
RemoteServiceWithoutAuthorization
on the called method or interface in the
class treeprotected void handleException(Throwable t)
The default implementation handles an exception via ExceptionHandler
, but only if the current context is
not cancelled.
protected Throwable interceptException(Throwable t)
ServiceTunnelResponse
to be sent
to the client. This method must not throw an exception.
Security: do not send back original error and stack trace with implementation details.
The default implementation returns an empty exception, or in case of a VetoException
only its title,
message, htmlMessage, error code and severity.
Copyright © 2010–2017. All rights reserved.