com.lightdev.app.fileserver.http
Class AuthorisationInterceptor

java.lang.Object
  extended by com.lightdev.app.fileserver.http.AuthorisationInterceptor
All Implemented Interfaces:
XmlRpcInvocationInterceptor

public class AuthorisationInterceptor
extends Object
implements XmlRpcInvocationInterceptor

An object of class AuthorisationInterceptor can be used to intercept XML-RPC method calls in the context of the Redstone XML-RPC library. Calls are inspected for a proper session id. Without such id calls are rejected.

Version:
1, 2.3.2008
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software

Field Summary
static String ROLE_ID_FILE_MANAGER
           
 
Constructor Summary
AuthorisationInterceptor(Gatekeeper g)
          create a new instance of class AuthorisationInterceptor
 
Method Summary
 Object after(XmlRpcInvocation incovation, Object returnValue)
          what to do after method invocation and prior return from this interceptor.
 boolean before(XmlRpcInvocation invocation)
          Inspect method invocation for proper session ids.
 void onException(XmlRpcInvocation arg0, Throwable arg1)
          handle an exception, unused here
 void setGatekeeper(Gatekeeper gatekeeper)
          set the gatekeeper object to use for session validation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE_ID_FILE_MANAGER

public static final String ROLE_ID_FILE_MANAGER
See Also:
Constant Field Values
Constructor Detail

AuthorisationInterceptor

public AuthorisationInterceptor(Gatekeeper g)
create a new instance of class AuthorisationInterceptor

Parameters:
g - the gatekeeper to use for session validation
Method Detail

setGatekeeper

public void setGatekeeper(Gatekeeper gatekeeper)
set the gatekeeper object to use for session validation

Parameters:
gatekeeper - the gatekeeper to use to validate sessions

after

public Object after(XmlRpcInvocation incovation,
                    Object returnValue)
what to do after method invocation and prior return from this interceptor.

Specified by:
after in interface XmlRpcInvocationInterceptor

before

public boolean before(XmlRpcInvocation invocation)
Inspect method invocation for proper session ids. Method invocations my only proceed when they contain a valid session id.

Specified by:
before in interface XmlRpcInvocationInterceptor

onException

public void onException(XmlRpcInvocation arg0,
                        Throwable arg1)
handle an exception, unused here

Specified by:
onException in interface XmlRpcInvocationInterceptor