org.inria.ns.reflex.util.wunit
Class DirectConnexion

java.lang.Object
  extended by org.apache.commons.httpclient.HttpConnection
      extended by org.inria.ns.reflex.util.wunit.DirectConnexion

public class DirectConnexion
extends HttpConnection

A connexion that forward I/O to a server emulator. No network connexion is used.

Author:
Philippe Poulard

Constructor Summary
DirectConnexion(HostConfiguration hostConfiguration, ServerEmulator serverEmulator, IntrusiveXClient client, HttpConnectionManager connectionManager)
          Connect an HTTP connexion to a server emulator without using sockets.
 
Method Summary
 boolean isResponseAvailable(int timeout)
          Do nothing.
 void open()
          Open the connexion, that is to say make a bridge between the output request of the client and the input request of the server in one hand, and between the output response of the server and the input response of the client on the other hand.
 void shutdownOutput()
          Do nothing.
 void tunnelCreated()
          Do nothing.
 
Methods inherited from class org.apache.commons.httpclient.HttpConnection
close, closeIfStale, flushRequestOutputStream, getHost, getHttpConnectionManager, getLastResponseInputStream, getLocalAddress, getParams, getPort, getProtocol, getProxyHost, getProxyPort, getRequestOutputStream, getResponseInputStream, getSendBufferSize, getSoTimeout, getVirtualHost, isOpen, isProxied, isResponseAvailable, isSecure, isStaleCheckingEnabled, isTransparent, print, print, printLine, printLine, printLine, readLine, readLine, releaseConnection, setConnectionTimeout, setHost, setHttpConnectionManager, setLastResponseInputStream, setLocalAddress, setParams, setPort, setProtocol, setProxyHost, setProxyPort, setSendBufferSize, setSocketTimeout, setSoTimeout, setStaleCheckingEnabled, setVirtualHost, write, write, writeLine, writeLine
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectConnexion

public DirectConnexion(HostConfiguration hostConfiguration,
                       ServerEmulator serverEmulator,
                       IntrusiveXClient client,
                       HttpConnectionManager connectionManager)
Connect an HTTP connexion to a server emulator without using sockets.

A direct connexion can be used like any other connexion of HttpClient.

Parameters:
hostConfiguration - The configuration of the HTTP connexion.
serverEmulator - The server emulator.
client - The client.
connectionManager - The connection manager.
Method Detail

open

public void open()
          throws IOException
Open the connexion, that is to say make a bridge between the output request of the client and the input request of the server in one hand, and between the output response of the server and the input response of the client on the other hand.

Overrides:
open in class HttpConnection
Throws:
IOException

tunnelCreated

public void tunnelCreated()
                   throws IllegalStateException,
                          IOException
Do nothing.

Overrides:
tunnelCreated in class HttpConnection
Throws:
IllegalStateException
IOException

isResponseAvailable

public boolean isResponseAvailable(int timeout)
Do nothing.

Overrides:
isResponseAvailable in class HttpConnection

shutdownOutput

public void shutdownOutput()
Do nothing.

Overrides:
shutdownOutput in class HttpConnection