org.fusesource.hawtdispatch.transport
Class SslTransport
java.lang.Object
org.fusesource.hawtdispatch.transport.ServiceBase
org.fusesource.hawtdispatch.transport.TcpTransport
org.fusesource.hawtdispatch.transport.SslTransport
- All Implemented Interfaces:
- SecureTransport, Transport
public class SslTransport
- extends TcpTransport
- implements SecureTransport
An SSL Transport for secure communications.
- Author:
- Hiram Chirino
| Fields inherited from class org.fusesource.hawtdispatch.transport.TcpTransport |
channel, codec, dispatchQueue, drainOutboundSource, IPTOS_LOWCOST, IPTOS_LOWDELAY, IPTOS_RELIABILITY, IPTOS_THROUGHPUT, listener, localLocation, rateLimitingChannel, remoteLocation, socketState, useLocalHost, yieldSource |
| Methods inherited from class org.fusesource.hawtdispatch.transport.TcpTransport |
_start, _stop, full, getDispatchQueue, getLocalAddress, getMaxReadRate, getMaxWriteRate, getProtocolCodec, getReceiveBufferSize, getRemoteAddress, getSendBufferSize, getSocketChannel, getTrafficClass, getTransportListener, initializeCodec, isClosed, isConnected, isKeepAlive, isUseLocalHost, offer, onTransportFailure, resolveHostName, resumeRead, resumeWrite, setDispatchQueue, setKeepAlive, setMaxReadRate, setMaxWriteRate, setProtocolCodec, setReceiveBufferSize, setSendBufferSize, setTrafficClass, setTransportListener, setUseLocalHost, suspendRead, suspendWrite |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.fusesource.hawtdispatch.transport.Transport |
full, getDispatchQueue, getLocalAddress, getProtocolCodec, getRemoteAddress, getTransportListener, isClosed, isConnected, offer, resumeRead, setDispatchQueue, setProtocolCodec, setTransportListener, start, start, stop, stop, suspendRead |
SslTransport
public SslTransport()
protocol
public static String protocol(String scheme)
- Maps uri schemes to a protocol algorithm names.
Valid algorithm names listed at:
http://download.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html#SSLContext
setSSLContext
public void setSSLContext(SSLContext ctx)
createTransport
public static SslTransport createTransport(URI uri)
throws Exception
- Allows subclasses of TcpTransportFactory to create custom instances of
TcpTransport.
- Throws:
Exception
getSSLSession
public SSLSession getSSLSession()
getPeerX509Certificates
public X509Certificate[] getPeerX509Certificates()
- Description copied from interface:
SecureTransport
- Gets the X509Certificate associated withe the peer.
- Specified by:
getPeerX509Certificates in interface SecureTransport
- Returns:
connecting
public void connecting(URI remoteLocation,
URI localLocation)
throws Exception
- Overrides:
connecting in class TcpTransport
- Throws:
Exception
connected
public void connected(SocketChannel channel)
throws Exception
- Overrides:
connected in class TcpTransport
- Throws:
Exception
initializeChannel
protected void initializeChannel()
throws Exception
- Overrides:
initializeChannel in class TcpTransport
- Throws:
Exception
onConnected
protected void onConnected()
throws IOException
- Overrides:
onConnected in class TcpTransport
- Throws:
IOException
flush
public void flush()
- Description copied from interface:
Transport
- Forces a flush of any output buffers. Once the flush completes the listener's
'onRefill()' method will execute.
- Specified by:
flush in interface Transport- Overrides:
flush in class TcpTransport
drainInbound
protected void drainInbound()
- Overrides:
drainInbound in class TcpTransport
transportFlush
protected boolean transportFlush()
throws IOException
- Overrides:
transportFlush in class TcpTransport
- Returns:
- true if fully flushed.
- Throws:
IOException
handshake
public void handshake()
readChannel
public ReadableByteChannel readChannel()
- Overrides:
readChannel in class TcpTransport
writeChannel
public WritableByteChannel writeChannel()
- Overrides:
writeChannel in class TcpTransport
getBlockingExecutor
public Executor getBlockingExecutor()
setBlockingExecutor
public void setBlockingExecutor(Executor blockingExecutor)
getClientAuth
public String getClientAuth()
setClientAuth
public void setClientAuth(String clientAuth)
Copyright © 2010-2012 FuseSource, Corp.. All Rights Reserved.