com.caucho.server.connection
Class StreamConnection

java.lang.Object
  extended by com.caucho.server.connection.Connection
      extended by com.caucho.server.connection.StreamConnection

public class StreamConnection
extends Connection

A Connection based on streams. Stream connection is primarily used for testing.


Field Summary
 
Fields inherited from class com.caucho.server.connection.Connection
_controller
 
Constructor Summary
StreamConnection()
           
StreamConnection(java.io.InputStream is, java.io.OutputStream os)
           
 
Method Summary
 int getId()
          Returns the connection id.
 java.net.InetAddress getLocalAddress()
          Returns the local address of the connection
 int getLocalPort()
          Returns the local port of the connection
 java.net.InetAddress getRemoteAddress()
          Returns the remote address of the connection
 int getRemotePort()
          Returns the remove port of the connection
 java.lang.String getVirtualHost()
          Returns the static virtual host
 boolean isSecure()
          Returns true if secure (ssl)
 void setLocalAddress(java.net.InetAddress addr)
           
 void setLocalPort(int port)
           
 void setRemoteAddress(java.net.InetAddress addr)
           
 void setRemotePort(int port)
           
 void setSecure(boolean isSecure)
           
 void setStream(java.io.InputStream is, java.io.OutputStream os)
           
 void setVirtualHost(java.lang.String virtualHost)
           
 
Methods inherited from class com.caucho.server.connection.Connection
closeControllerImpl, getController, getReadStream, getRemoteAddress, getRemoteHost, getWriteStream, sendBroadcast, setController, wake
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamConnection

public StreamConnection()

StreamConnection

public StreamConnection(java.io.InputStream is,
                        java.io.OutputStream os)
Method Detail

getId

public int getId()
Description copied from class: Connection
Returns the connection id. Primarily for debugging.

Specified by:
getId in class Connection

getLocalAddress

public java.net.InetAddress getLocalAddress()
Description copied from class: Connection
Returns the local address of the connection

Specified by:
getLocalAddress in class Connection

getLocalPort

public int getLocalPort()
Description copied from class: Connection
Returns the local port of the connection

Specified by:
getLocalPort in class Connection

getRemoteAddress

public java.net.InetAddress getRemoteAddress()
Description copied from class: Connection
Returns the remote address of the connection

Specified by:
getRemoteAddress in class Connection

getRemotePort

public int getRemotePort()
Description copied from class: Connection
Returns the remove port of the connection

Specified by:
getRemotePort in class Connection

setRemotePort

public void setRemotePort(int port)

getVirtualHost

public java.lang.String getVirtualHost()
Description copied from class: Connection
Returns the static virtual host

Overrides:
getVirtualHost in class Connection

setVirtualHost

public void setVirtualHost(java.lang.String virtualHost)

setStream

public void setStream(java.io.InputStream is,
                      java.io.OutputStream os)

setSecure

public void setSecure(boolean isSecure)

isSecure

public boolean isSecure()
Description copied from class: Connection
Returns true if secure (ssl)

Overrides:
isSecure in class Connection

setLocalAddress

public void setLocalAddress(java.net.InetAddress addr)

setLocalPort

public void setLocalPort(int port)

setRemoteAddress

public void setRemoteAddress(java.net.InetAddress addr)