org.jboss.aerogear.controller.router.decorators
Class SecurityHandler
java.lang.Object
org.jboss.aerogear.controller.router.decorators.SecurityHandler
- All Implemented Interfaces:
- RouteProcessor
@Decorator
public class SecurityHandler
- extends Object
- implements RouteProcessor
SecurityHandler is a CDI Decorator that decorates a RouteProcessor.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
delegate
private final RouteProcessor delegate
securityProvider
private final SecurityProvider securityProvider
SecurityHandler
@Inject
public SecurityHandler(@Delegate
RouteProcessor delegate,
javax.enterprise.inject.Instance<SecurityProvider> securityProviders)
- Sole constructor which will have its parameters injected by CDI.
- Parameters:
delegate - the target RouteProcessor.securityProviders - the security provider to be used.
process
public void process(RouteContext routeContext)
throws Exception
- This method will use the injected
SecurityProvider to access to the route is allowed.
If access is allowed this methods simply delegates to the target RouteProcessor.
- Specified by:
process in interface RouteProcessor
- Parameters:
routeContext - the RouteContext for the current request.
- Throws:
Exception - if access to the Route is denied.
defaultSecurityProvider
private SecurityProvider defaultSecurityProvider()
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.