org.apache.xmlrpc.secure
Class SecureWebServer

java.lang.Object
  |
  +--org.apache.xmlrpc.WebServer
        |
        +--org.apache.xmlrpc.secure.SecureWebServer
All Implemented Interfaces:
java.lang.Runnable, SecurityConstants

public class SecureWebServer
extends WebServer
implements SecurityConstants

A minimal web server that exclusively handles XML-RPC requests over a secure channel. Standard security properties must be set before the SecureWebserver can be used. The SecurityTool takes care of retrieving these values, but the parent application must set the necessary values before anything will work.

Version:
$Id: SecureWebServer.java,v 1.2 2001/08/11 10:15:52 dlr Exp $
Author:
Jason van Zyl

Inner classes inherited from class org.apache.xmlrpc.WebServer
WebServer.AddressMatcher, WebServer.Connection, WebServer.Runner
 
Fields inherited from class org.apache.xmlrpc.WebServer
accept, clength, conclose, conkeep, ctype, deny, doubleNewline, listener, newline, ok, paranoid, port, runners, server, serverSocket, threadpool, xmlrpc
 
Fields inherited from interface org.apache.xmlrpc.secure.SecurityConstants
DEFAULT_KEY_MANAGER_TYPE, DEFAULT_KEY_STORE, DEFAULT_KEY_STORE_PASSWORD, DEFAULT_KEY_STORE_TYPE, DEFAULT_PROTOCOL_HANDLER_PACKAGES, DEFAULT_SECURITY_PROTOCOL, DEFAULT_SECURITY_PROVIDER_CLASS, DEFAULT_TRUST_STORE, DEFAULT_TRUST_STORE_PASSWORD, DEFAULT_TRUST_STORE_TYPE, KEY_MANAGER_TYPE, KEY_STORE, KEY_STORE_PASSWORD, KEY_STORE_TYPE, PROTOCOL_HANDLER_PACKAGES, SECURITY_PROTOCOL, SECURITY_PROVIDER_CLASS, TRUST_MANAGER_TYPE, TRUST_STORE, TRUST_STORE_PASSWORD, TRUST_STORE_TYPE
 
Constructor Summary
SecureWebServer(int port)
          Creates a secure web server at the specified port number.
SecureWebServer(int port, java.net.InetAddress add)
          Creates a secure web server at the specified port number and IP address.
 
Method Summary
protected  java.net.ServerSocket createServerSocket(int port, int backlog, java.net.InetAddress add)
          Factory method to manufacture the server socket.
static void main(java.lang.String[] args)
          This can be called from command line, but you'll have to edit and recompile to change the server port or handler objects.
 
Methods inherited from class org.apache.xmlrpc.WebServer
acceptClient, addHandler, checkSocket, denyClient, getRunner, releaseRunner, removeHandler, run, setParanoid, setupServerSocket, shutdown, start
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

SecureWebServer

public SecureWebServer(int port)
                throws java.io.IOException
Creates a secure web server at the specified port number.
Parameters:
int - port number of secure web server.

SecureWebServer

public SecureWebServer(int port,
                       java.net.InetAddress add)
                throws java.io.IOException
Creates a secure web server at the specified port number and IP address.
Parameters:
int - port number of the secure web server
InetAddress - ip address to bind to.
Method Detail

createServerSocket

protected java.net.ServerSocket createServerSocket(int port,
                                                   int backlog,
                                                   java.net.InetAddress add)
                                            throws java.lang.Exception
Description copied from class: WebServer
Factory method to manufacture the server socket. Useful as a hook method for subclasses to override when they desire different flavor of socket (i.e. a SSLServerSocket).
Overrides:
createServerSocket in class WebServer
See Also:
WebServer.createServerSocket(int port, int backlog, InetAddress add)

main

public static void main(java.lang.String[] args)
This can be called from command line, but you'll have to edit and recompile to change the server port or handler objects. By default, it sets up the following responders:


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.