|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.component.AbstractLifeCycle org.mortbay.jetty.AbstractBuffers org.mortbay.jetty.AbstractConnector org.mortbay.jetty.bio.SocketConnector org.mortbay.jetty.security.SslSocketConnector
public class SslSocketConnector
JSSE Socket Listener. This specialization of HttpListener is an abstract listener that can be used as the basis for a specific JSSE listener. This is heavily based on the work from Court Demas, which in turn is based on the work from Forge Research.
Nested Class Summary | |
---|---|
class |
SslSocketConnector.SslConnection
|
Nested classes/interfaces inherited from class org.mortbay.jetty.bio.SocketConnector |
---|
SocketConnector.Connection |
Field Summary | |
---|---|
static String |
DEFAULT_KEYSTORE
Default value for the keystore location path. |
static String |
KEYPASSWORD_PROPERTY
String name of key password property. |
static String |
PASSWORD_PROPERTY
String name of keystore password property. |
Fields inherited from class org.mortbay.jetty.bio.SocketConnector |
---|
_connections, _serverSocket |
Fields inherited from class org.mortbay.jetty.AbstractConnector |
---|
_lowResourceMaxIdleTime, _maxIdleTime, _soLingerTime |
Fields inherited from class org.mortbay.jetty.AbstractBuffers |
---|
_loss, BUFFER_LOSS_RATE |
Constructor Summary | |
---|---|
SslSocketConnector()
Constructor. |
Method Summary | |
---|---|
void |
accept(int acceptorID)
|
protected void |
configure(Socket socket)
|
protected SSLServerSocketFactory |
createFactory()
|
void |
customize(EndPoint endpoint,
Request request)
Allow the Listener a chance to customise the request. |
String[] |
getExcludeCipherSuites()
|
int |
getHandshakeTimeout()
|
String |
getKeystore()
|
String |
getKeystoreType()
|
boolean |
getNeedClientAuth()
|
String |
getProtocol()
|
String |
getProvider()
|
String |
getSecureRandomAlgorithm()
|
String |
getSslKeyManagerFactoryAlgorithm()
|
String |
getSslTrustManagerFactoryAlgorithm()
|
String |
getTruststore()
|
String |
getTruststoreType()
|
boolean |
getWantClientAuth()
|
boolean |
isConfidential(Request request)
By default, we're confidential, given we speak SSL. |
boolean |
isIntegral(Request request)
By default, we're integral, given we speak SSL. |
protected ServerSocket |
newServerSocket(String host,
int port,
int backlog)
|
void |
setExcludeCipherSuites(String[] cipherSuites)
|
void |
setHandshakeTimeout(int msec)
Set the time in milliseconds for so_timeout during ssl handshaking |
void |
setKeyPassword(String password)
|
void |
setKeystore(String keystore)
|
void |
setKeystoreType(String keystoreType)
|
void |
setNeedClientAuth(boolean needClientAuth)
Set the value of the needClientAuth property |
void |
setPassword(String password)
|
void |
setProtocol(String protocol)
|
void |
setProvider(String _provider)
|
void |
setSecureRandomAlgorithm(String algorithm)
|
void |
setSslKeyManagerFactoryAlgorithm(String algorithm)
|
void |
setSslTrustManagerFactoryAlgorithm(String algorithm)
|
void |
setTrustPassword(String password)
|
void |
setTruststore(String truststore)
|
void |
setTruststoreType(String truststoreType)
|
void |
setWantClientAuth(boolean wantClientAuth)
Set the value of the _wantClientAuth property. |
Methods inherited from class org.mortbay.jetty.bio.SocketConnector |
---|
close, doStart, doStop, getConnection, getLocalPort, newBuffer, newHttpConnection, open |
Methods inherited from class org.mortbay.jetty.AbstractBuffers |
---|
getBuffer, getHeaderBufferSize, getRequestBufferSize, getResponseBufferSize, returnBuffer, setHeaderBufferSize, setRequestBufferSize, setResponseBufferSize |
Methods inherited from class org.mortbay.component.AbstractLifeCycle |
---|
isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.mortbay.jetty.Connector |
---|
getHeaderBufferSize, getRequestBufferSize, getResponseBufferSize, setHeaderBufferSize, setRequestBufferSize, setResponseBufferSize |
Methods inherited from interface org.mortbay.component.LifeCycle |
---|
isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, start, stop |
Methods inherited from interface org.mortbay.io.Buffers |
---|
getBuffer, returnBuffer |
Field Detail |
---|
public static final String DEFAULT_KEYSTORE
public static final String KEYPASSWORD_PROPERTY
public static final String PASSWORD_PROPERTY
Constructor Detail |
---|
public SslSocketConnector()
Method Detail |
---|
public void accept(int acceptorID) throws IOException, InterruptedException
accept
in class SocketConnector
IOException
InterruptedException
protected void configure(Socket socket) throws IOException
configure
in class AbstractConnector
IOException
protected SSLServerSocketFactory createFactory() throws Exception
Exception
public void customize(EndPoint endpoint, Request request) throws IOException
customize
in interface Connector
customize
in class SocketConnector
endpoint
- The Socket the request arrived on.
This should be a SocketEndPoint
wrapping a SSLSocket
.request
- HttpRequest to be customised.
IOException
public String[] getExcludeCipherSuites()
public String getKeystore()
public String getKeystoreType()
public boolean getNeedClientAuth()
public String getProtocol()
public String getProvider()
public String getSecureRandomAlgorithm()
public String getSslKeyManagerFactoryAlgorithm()
public String getSslTrustManagerFactoryAlgorithm()
public String getTruststore()
public String getTruststoreType()
public boolean getWantClientAuth()
public boolean isConfidential(Request request)
isConfidential
in interface Connector
isConfidential
in class AbstractConnector
request
- A request
public boolean isIntegral(Request request)
isIntegral
in interface Connector
isIntegral
in class AbstractConnector
request
- A request
protected ServerSocket newServerSocket(String host, int port, int backlog) throws IOException
newServerSocket
in class SocketConnector
addr
- The address
that this server should listen onbacklog
- See ServerSocket.bind(java.net.SocketAddress, int)
socket object
bound to the supplied address with all other
settings as per the current configuration of this connector.
IOException
setWantClientAuth(boolean)
,
setNeedClientAuth(boolean)
,
#setCipherSuites
public void setExcludeCipherSuites(String[] cipherSuites)
public void setKeyPassword(String password)
public void setKeystore(String keystore)
public void setKeystoreType(String keystoreType)
public void setNeedClientAuth(boolean needClientAuth)
needClientAuth
- true iff we require client certificate authentication.public void setPassword(String password)
public void setTrustPassword(String password)
public void setProtocol(String protocol)
public void setProvider(String _provider)
public void setSecureRandomAlgorithm(String algorithm)
public void setSslKeyManagerFactoryAlgorithm(String algorithm)
public void setSslTrustManagerFactoryAlgorithm(String algorithm)
public void setTruststore(String truststore)
public void setTruststoreType(String truststoreType)
public void setWantClientAuth(boolean wantClientAuth)
opening server sockets
.
wantClientAuth
- true iff we want client certificate authentication.SSLServerSocket.setWantClientAuth(boolean)
public void setHandshakeTimeout(int msec)
msec
- a non-zero value will be used to set so_timeout during
ssl handshakes. A zero value means the maxIdleTime is used instead.public int getHandshakeTimeout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |