org.apache.xmlrpc.secure

Class SecureWebServer

Implemented Interfaces:
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 233919 2005-04-22 10:26:17Z hgomez $
Author:
Jason van Zyl

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.xmlrpc.WebServer

WebServer.AddressMatcher, WebServer.Connection, WebServer.Runner

Field Summary

Fields inherited from class org.apache.xmlrpc.WebServer

HTTP_11, STAR, accept, address, clength, conclose, conkeep, ctype, deny, doubleNewline, listener, newline, ok, paranoid, port, runners, server, serverSocket, threadpool, wwwAuthenticate, 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 configured to run on the specified port number.
SecureWebServer(int port, InetAddress addr)
Creates a secure web server configured to run on the specified port number and IP address.
SecureWebServer(int port, InetAddress addr, XmlRpcServer xmlrpc)
Creates a secure web server at the specified port number and IP address.

Method Summary

protected ServerSocket
createServerSocket(int port, int backlog, InetAddress add)
static void
main(String[] argv)
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, addDefaultHandlers, addHandler, allowConnection, checkSocket, createServerSocket, denyClient, determinePort, getRunner, main, removeHandler, repoolRunner, run, setParanoid, setupServerSocket, shutdown, start, toHTTPBytes

Constructor Details

SecureWebServer

public SecureWebServer(int port)
Creates a secure web server configured to run on the specified port number.
Parameters:

SecureWebServer

public SecureWebServer(int port,
                       InetAddress addr)
Creates a secure web server configured to run on the specified port number and IP address.
Parameters:
addr - The IP address to bind to.

SecureWebServer

public SecureWebServer(int port,
                       InetAddress addr,
                       XmlRpcServer xmlrpc)
Creates a secure web server at the specified port number and IP address.

Method Details

createServerSocket

protected ServerSocket createServerSocket(int port,
                                          int backlog,
                                          InetAddress add)
            throws Exception
Overrides:
createServerSocket in interface WebServer
See Also:
org.apache.xmlrpc.WebServer.createServerSocket(int port, int backlog, InetAddress add)

main

public static void main(String[] argv)
This can be called from command line, but you'll have to edit and recompile to change the server port or handler objects.
Overrides:
main in interface WebServer

Copyright B) 1999-2002 Apache Software Foundation. All Rights Reserved.