org.mule.transport.http
Class HttpServerConnection

java.lang.Object
  extended by org.mule.transport.http.HttpServerConnection

public class HttpServerConnection
extends Object

A connection to the SimpleHttpServer.


Constructor Summary
HttpServerConnection(Socket socket, String encoding, HttpConnector connector)
           
 
Method Summary
 void close()
           
 InputStream getInputStream()
           
 OutputStream getOutputStream()
           
 int getSocketTimeout()
           
 ResponseWriter getWriter()
          Returns the ResponseWriter used to write the output to the socket.
 boolean isKeepAlive()
           
 boolean isOpen()
           
 HttpRequest readRequest()
           
 HttpResponse readResponse()
           
 void setKeepAlive(boolean b)
           
 void setSocketTimeout(int timeout)
           
 void writeRequest(HttpRequest request)
           
 void writeResponse(HttpResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServerConnection

public HttpServerConnection(Socket socket,
                            String encoding,
                            HttpConnector connector)
                     throws IOException
Throws:
IOException
Method Detail

close

public void close()

isOpen

public boolean isOpen()

setKeepAlive

public void setKeepAlive(boolean b)

isKeepAlive

public boolean isKeepAlive()

getInputStream

public InputStream getInputStream()

getOutputStream

public OutputStream getOutputStream()

getWriter

public ResponseWriter getWriter()
                         throws UnsupportedEncodingException
Returns the ResponseWriter used to write the output to the socket.

Returns:
This connection's ResponseWriter
Throws:
UnsupportedEncodingException

readRequest

public HttpRequest readRequest()
                        throws IOException
Throws:
IOException

readResponse

public HttpResponse readResponse()
                          throws IOException
Throws:
IOException

writeRequest

public void writeRequest(HttpRequest request)
                  throws IOException
Throws:
IOException

writeResponse

public void writeResponse(HttpResponse response)
                   throws IOException,
                          TransformerException
Throws:
IOException
TransformerException

getSocketTimeout

public int getSocketTimeout()
                     throws SocketException
Throws:
SocketException

setSocketTimeout

public void setSocketTimeout(int timeout)
                      throws SocketException
Throws:
SocketException


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.