org.apache.oodt.cas.filemgr.system.auth
Class SecureWebServer

java.lang.Object
  extended by org.apache.xmlrpc.WebServer
      extended by org.apache.oodt.cas.filemgr.system.auth.SecureWebServer
All Implemented Interfaces:
Runnable, org.apache.xmlrpc.AuthenticatedXmlRpcHandler

public final class SecureWebServer
extends org.apache.xmlrpc.WebServer
implements org.apache.xmlrpc.AuthenticatedXmlRpcHandler

An XML-RPC Web Server that requires authentication and authorization.

Author:
kelly

Field Summary
 
Fields inherited from class org.apache.xmlrpc.WebServer
accept, clength, conclose, conkeep, ctype, deny, doubleNewline, listener, newline, ok, runners, server, serverSocket, threadpool, wwwAuthenticate, xmlrpc
 
Constructor Summary
SecureWebServer(int port)
          Initializes the XML-RPC web server on the given port and adds a default handler that traps all calls and makes them authenticated.
 
Method Summary
 void addDispatcher(Dispatcher dispatcher)
          Adds an authenticated XML-RPC dispatcher.
 Object execute(String methodSpecifier, Vector params, String user, String password)
          Executes the XML-RPC method, first authenticating the given user and authorizing him based on his roles.
 
Methods inherited from class org.apache.xmlrpc.WebServer
acceptClient, addDefaultHandlers, addHandler, allowConnection, checkSocket, createServerSocket, denyClient, determinePort, getRunner, main, removeHandler, run, setParanoid, shutdown, start, toHTTPBytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureWebServer

public SecureWebServer(int port)
                throws IOException
Initializes the XML-RPC web server on the given port and adds a default handler that traps all calls and makes them authenticated.

Parameters:
port - The port to run the XML-RPC webserver on.
Throws:
IOException - If any error occurs.
Method Detail

execute

public Object execute(String methodSpecifier,
                      Vector params,
                      String user,
                      String password)
               throws Exception
Executes the XML-RPC method, first authenticating the given user and authorizing him based on his roles.

Specified by:
execute in interface org.apache.xmlrpc.AuthenticatedXmlRpcHandler
Parameters:
methodSpecifier - the name of the XML-RPC method to call.
params - the parameters passed to the method.
Throws:
Exception

addDispatcher

public void addDispatcher(Dispatcher dispatcher)
Adds an authenticated XML-RPC dispatcher.

Parameters:
dispatcher - The dispatcher to add which will service the authenticated XML-RPC method calls


Copyright © 1999-2011 Apache OODT. All Rights Reserved.