org.apache.http.impl.nio.reactor
Class SSLIOSession

java.lang.Object
  extended by org.apache.http.impl.nio.reactor.SSLIOSession
All Implemented Interfaces:
org.apache.http.nio.reactor.IOSession, org.apache.http.nio.reactor.SessionBufferStatus

public class SSLIOSession
extends java.lang.Object
implements org.apache.http.nio.reactor.IOSession, org.apache.http.nio.reactor.SessionBufferStatus

A decorator class intended to transparently extend an IOSession with transport layer security capabilities based on the SSL/TLS protocol.

Author:
Oleg Kalnichevski

Field Summary
 
Fields inherited from interface org.apache.http.nio.reactor.IOSession
ATTACHMENT_KEY
 
Constructor Summary
SSLIOSession(org.apache.http.nio.reactor.IOSession session, javax.net.ssl.SSLContext sslContext, SSLIOSessionHandler handler)
           
 
Method Summary
 java.nio.channels.ByteChannel channel()
           
 void clearEvent(int op)
           
 void close()
           
 java.lang.Object getAttribute(java.lang.String name)
           
 int getEventMask()
           
 java.net.SocketAddress getLocalAddress()
           
 java.net.SocketAddress getRemoteAddress()
           
 int getSocketTimeout()
           
 boolean hasBufferedInput()
           
 boolean hasBufferedOutput()
           
 void inboundTransport()
           
 void initialize(SSLMode mode, org.apache.http.params.HttpParams params)
           
 boolean isAppInputReady()
           
 boolean isAppOutputReady()
           
 boolean isClosed()
           
 boolean isInboundDone()
           
 boolean isOutboundDone()
           
 void outboundTransport()
           
 java.lang.Object removeAttribute(java.lang.String name)
           
 void setAttribute(java.lang.String name, java.lang.Object obj)
           
 void setBufferStatus(org.apache.http.nio.reactor.SessionBufferStatus status)
           
 void setEvent(int op)
           
 void setEventMask(int ops)
           
 void setSocketTimeout(int timeout)
           
 void shutdown()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SSLIOSession

public SSLIOSession(org.apache.http.nio.reactor.IOSession session,
                    javax.net.ssl.SSLContext sslContext,
                    SSLIOSessionHandler handler)
Method Detail

initialize

public void initialize(SSLMode mode,
                       org.apache.http.params.HttpParams params)
                throws javax.net.ssl.SSLException
Throws:
javax.net.ssl.SSLException

isAppInputReady

public boolean isAppInputReady()
                        throws java.io.IOException
Throws:
java.io.IOException

isAppOutputReady

public boolean isAppOutputReady()
                         throws java.io.IOException
Throws:
java.io.IOException

inboundTransport

public void inboundTransport()
                      throws java.io.IOException
Throws:
java.io.IOException

outboundTransport

public void outboundTransport()
                       throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
Specified by:
close in interface org.apache.http.nio.reactor.IOSession

isClosed

public boolean isClosed()
Specified by:
isClosed in interface org.apache.http.nio.reactor.IOSession

isInboundDone

public boolean isInboundDone()

isOutboundDone

public boolean isOutboundDone()

shutdown

public void shutdown()

channel

public java.nio.channels.ByteChannel channel()
Specified by:
channel in interface org.apache.http.nio.reactor.IOSession

getLocalAddress

public java.net.SocketAddress getLocalAddress()
Specified by:
getLocalAddress in interface org.apache.http.nio.reactor.IOSession

getRemoteAddress

public java.net.SocketAddress getRemoteAddress()
Specified by:
getRemoteAddress in interface org.apache.http.nio.reactor.IOSession

getEventMask

public int getEventMask()
Specified by:
getEventMask in interface org.apache.http.nio.reactor.IOSession

setEventMask

public void setEventMask(int ops)
Specified by:
setEventMask in interface org.apache.http.nio.reactor.IOSession

setEvent

public void setEvent(int op)
Specified by:
setEvent in interface org.apache.http.nio.reactor.IOSession

clearEvent

public void clearEvent(int op)
Specified by:
clearEvent in interface org.apache.http.nio.reactor.IOSession

getSocketTimeout

public int getSocketTimeout()
Specified by:
getSocketTimeout in interface org.apache.http.nio.reactor.IOSession

setSocketTimeout

public void setSocketTimeout(int timeout)
Specified by:
setSocketTimeout in interface org.apache.http.nio.reactor.IOSession

hasBufferedInput

public boolean hasBufferedInput()
Specified by:
hasBufferedInput in interface org.apache.http.nio.reactor.IOSession
Specified by:
hasBufferedInput in interface org.apache.http.nio.reactor.SessionBufferStatus

hasBufferedOutput

public boolean hasBufferedOutput()
Specified by:
hasBufferedOutput in interface org.apache.http.nio.reactor.IOSession
Specified by:
hasBufferedOutput in interface org.apache.http.nio.reactor.SessionBufferStatus

setBufferStatus

public void setBufferStatus(org.apache.http.nio.reactor.SessionBufferStatus status)
Specified by:
setBufferStatus in interface org.apache.http.nio.reactor.IOSession

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Specified by:
getAttribute in interface org.apache.http.nio.reactor.IOSession

removeAttribute

public java.lang.Object removeAttribute(java.lang.String name)
Specified by:
removeAttribute in interface org.apache.http.nio.reactor.IOSession

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object obj)
Specified by:
setAttribute in interface org.apache.http.nio.reactor.IOSession

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.