org.fusesource.stompjms.client.transport
Class SslTransport

java.lang.Object
  extended by org.fusesource.stompjms.client.transport.BaseService
      extended by org.fusesource.stompjms.client.transport.TcpTransport
          extended by org.fusesource.stompjms.client.transport.SslTransport
All Implemented Interfaces:
Transport

public class SslTransport
extends TcpTransport

An SSL Transport for secure communications.

Author:
Hiram Chirino

Nested Class Summary
 
Nested classes/interfaces inherited from class org.fusesource.stompjms.client.transport.BaseService
BaseService.STARTING, BaseService.State, BaseService.STOPPING
 
Field Summary
static java.util.HashMap<java.lang.String,java.lang.String> SCHEME_MAPPINGS
           
 
Fields inherited from class org.fusesource.stompjms.client.transport.TcpTransport
channel, codec, dispatchQueue, IPTOS_LOWCOST, IPTOS_LOWDELAY, IPTOS_RELIABILITY, IPTOS_THROUGHPUT, listener, localLocation, rateLimitingChannel, remoteLocation, socketState, useLocalHost
 
Fields inherited from class org.fusesource.stompjms.client.transport.BaseService
_serviceState, CREATED, STARTED, STOPPED
 
Constructor Summary
SslTransport()
           
 
Method Summary
 void connected(java.nio.channels.SocketChannel channel)
           
 void connecting(java.net.URI remoteLocation, java.net.URI localLocation)
           
static SslTransport createTransport(java.net.URI uri)
          Allows subclasses of TcpTransportFactory to create custom instances of TcpTransport.
protected  void drainInbound()
           
protected  void drainOutbound()
           
protected  boolean flush()
           
 java.util.concurrent.Executor getBlockingExecutor()
           
 java.security.cert.X509Certificate[] getPeerX509Certificates()
           
 javax.net.ssl.SSLSession getSSLSession()
           
 void handshake()
           
protected  void onConnected()
           
 java.nio.channels.ReadableByteChannel readChannel()
           
 void setBlockingExecutor(java.util.concurrent.Executor blockingExecutor)
           
 void setSSLContext(javax.net.ssl.SSLContext ctx)
           
 java.nio.channels.WritableByteChannel writeChannel()
           
 
Methods inherited from class org.fusesource.stompjms.client.transport.TcpTransport
_start, _stop, full, getDispatchQueue, getLocalAddress, getMaxReadRate, getMaxWriteRate, getProtocolCodec, getReceiveBufferSize, getRemoteAddress, getSendBufferSize, getSocketChannel, getTrafficClass, getTransportListener, getTypeId, initializeCodec, isConnected, isDisposed, isFaultTolerant, isUseLocalHost, narrow, offer, onTransportFailure, reconnect, resolveHostName, resumeRead, resumeWrite, setDispatchQueue, setMaxReadRate, setMaxWriteRate, setProtocolCodec, setReceiveBufferSize, setSendBufferSize, setTrafficClass, setTransportListener, setUseLocalHost, suspendRead, suspendWrite
 
Methods inherited from class org.fusesource.stompjms.client.transport.BaseService
getServiceState, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.fusesource.stompjms.client.transport.Transport
start, stop
 

Field Detail

SCHEME_MAPPINGS

public static final java.util.HashMap<java.lang.String,java.lang.String> SCHEME_MAPPINGS
Constructor Detail

SslTransport

public SslTransport()
Method Detail

setSSLContext

public void setSSLContext(javax.net.ssl.SSLContext ctx)

createTransport

public static SslTransport createTransport(java.net.URI uri)
                                    throws java.lang.Exception
Allows subclasses of TcpTransportFactory to create custom instances of TcpTransport.

Throws:
java.lang.Exception

getSSLSession

public javax.net.ssl.SSLSession getSSLSession()

getPeerX509Certificates

public java.security.cert.X509Certificate[] getPeerX509Certificates()

connecting

public void connecting(java.net.URI remoteLocation,
                       java.net.URI localLocation)
                throws java.lang.Exception
Overrides:
connecting in class TcpTransport
Throws:
java.lang.Exception

connected

public void connected(java.nio.channels.SocketChannel channel)
               throws java.lang.Exception
Overrides:
connected in class TcpTransport
Throws:
java.lang.Exception

onConnected

protected void onConnected()
                    throws java.io.IOException
Overrides:
onConnected in class TcpTransport
Throws:
java.io.IOException

drainOutbound

protected void drainOutbound()
Overrides:
drainOutbound in class TcpTransport

drainInbound

protected void drainInbound()
Overrides:
drainInbound in class TcpTransport

flush

protected boolean flush()
                 throws java.io.IOException
Overrides:
flush in class TcpTransport
Returns:
true if fully flushed.
Throws:
java.io.IOException

handshake

public void handshake()

readChannel

public java.nio.channels.ReadableByteChannel readChannel()
Overrides:
readChannel in class TcpTransport

writeChannel

public java.nio.channels.WritableByteChannel writeChannel()
Overrides:
writeChannel in class TcpTransport

getBlockingExecutor

public java.util.concurrent.Executor getBlockingExecutor()

setBlockingExecutor

public void setBlockingExecutor(java.util.concurrent.Executor blockingExecutor)


Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.