org.mortbay.http

Class SunJsseListener

Implemented Interfaces:
HttpListener, LifeCycle, Serializable

public class SunJsseListener
extends JsseListener

SSL Socket Listener for Sun's JSSE. This specialization of JsseListener is an specific listener using the Sun reference implementation. This is heavily based on the work from Court Demas, which in turn is based on the work from Forge Research.
Version:
$Id: SunJsseListener.java,v 1.20 2005/08/13 00:01:24 gregwilkins Exp $
Authors:
Greg Wilkins (gregw@mortbay.com)
Court Demas (court@kiwiconsulting.com)
Forge Research Pty Ltd ACN 003 491 576

Nested Class Summary

Nested classes/interfaces inherited from class org.mortbay.util.ThreadPool

ThreadPool.PoolThread

Field Summary

Fields inherited from class org.mortbay.http.JsseListener

DEFAULT_KEYSTORE, DEFAULT_KEYSTORE_PROVIDER_CLASS, DEFAULT_KEYSTORE_PROVIDER_NAME, DEFAULT_KEYSTORE_TYPE, KEYPASSWORD_PROPERTY, KEYSTORE_PROPERTY, KEYSTORE_PROVIDER_CLASS_PROPERTY, KEYSTORE_PROVIDER_NAME_PROPERTY, KEYSTORE_TYPE_PROPERTY, PASSWORD_PROPERTY

Fields inherited from class org.mortbay.util.ThreadPool

__DAEMON, __PRIORITY

Fields inherited from interface org.mortbay.http.HttpListener

ATTRIBUTE

Constructor Summary

SunJsseListener()
Constructor.
SunJsseListener(InetAddrPort p_address)
Constructor.

Method Summary

protected SSLServerSocketFactory
createFactory()
String
getKeystore()
String
getKeystoreProviderClass()
String
getKeystoreProviderName()
String
getKeystoreType()
boolean
getUseDefaultTrustStore()
Gets the default trust store flag.
void
setKeyPassword(String password)
void
setKeystore(String keystore)
void
setKeystoreProviderClass(String classname)
void
setKeystoreProviderName(String name)
void
setKeystoreType(String keystore_type)
void
setPassword(String password)
void
setUseDefaultTrustStore(boolean flag)
Set a flag to determine if the default truststore should be used to initialize the TrustManager.

Methods inherited from class org.mortbay.http.JsseListener

accept, createFactory, customizeRequest, getNeedClientAuth, isConfidential, isIntegral, newServerSocket, setNeedClientAuth

Methods inherited from class org.mortbay.http.SocketListener

createConnection, customizeRequest, customizeRequest, getBufferReserve, getBufferSize, getConfidentialPort, getConfidentialScheme, getDefaultScheme, getHttpHandler, getHttpServer, getIdentifyListener, getIntegralPort, getIntegralScheme, getLowResourcePersistTimeMs, getLowResources, handleConnection, isConfidential, isIntegral, isLowOnResources, isOutOfResources, persistConnection, setBufferReserve, setBufferSize, setConfidentialPort, setConfidentialScheme, setDefaultScheme, setHttpHandler, setHttpServer, setIdentifyListener, setIntegralPort, setIntegralScheme, setLowResourcePersistTimeMs, setLowResources, start, stop

Methods inherited from class org.mortbay.util.ThreadedServer

acceptSocket, acceptSocket, getAcceptQueueSize, getAcceptorThreads, getHost, getInetAddrPort, getInetAddress, getLingerTimeSecs, getMaxReadTimeMs, getPort, getServerSocket, getTcpNoDelay, handle, handleConnection, handleConnection, newServerSocket, open, setAcceptQueueSize, setAcceptorThreads, setHost, setInetAddrPort, setInetAddress, setLingerTimeSecs, setMaxReadTimeMs, setPort, setTcpNoDelay, start, stop, stopJob, toString

Methods inherited from class org.mortbay.util.ThreadPool

getIdleThreads, getMaxIdleTimeMs, getMaxThreads, getMinThreads, getName, getPoolName, getThreads, getThreadsPriority, handle, isDaemon, isStarted, join, run, setDaemon, setMaxIdleTimeMs, setMaxStopTimeMs, setMaxThreads, setMinThreads, setName, setPoolName, setThreadsPriority, shrink, start, stop, stopJob

Constructor Details

SunJsseListener

public SunJsseListener()
Constructor.

SunJsseListener

public SunJsseListener(InetAddrPort p_address)
Constructor.
Parameters:
p_address -

Method Details

createFactory

protected SSLServerSocketFactory createFactory()
            throws Exception
Overrides:
createFactory in interface JsseListener

getKeystore

public String getKeystore()

getKeystoreProviderClass

public String getKeystoreProviderClass()

getKeystoreProviderName

public String getKeystoreProviderName()

getKeystoreType

public String getKeystoreType()

getUseDefaultTrustStore

public boolean getUseDefaultTrustStore()
Gets the default trust store flag.
Returns:
true if the default truststore will be used to initialize the TrustManager, false otherwise.

setKeyPassword

public void setKeyPassword(String password)

setKeystore

public void setKeystore(String keystore)

setKeystoreProviderClass

public void setKeystoreProviderClass(String classname)

setKeystoreProviderName

public void setKeystoreProviderName(String name)

setKeystoreType

public void setKeystoreType(String keystore_type)

setPassword

public void setPassword(String password)

setUseDefaultTrustStore

public void setUseDefaultTrustStore(boolean flag)
Set a flag to determine if the default truststore should be used to initialize the TrustManager. The default truststore will typically be the ${JAVA_HOME}/jre/lib/security/cacerts.
Parameters:
flag - if true, the default truststore will be used. If false, the configured keystore will be used as the truststore.

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.