org.openrdf.http.object.client
Class RemoteConnection

java.lang.Object
  extended by org.openrdf.http.object.client.RemoteConnection

public class RemoteConnection
extends Object

A light weight abstraction that can convert message bodies.


Constructor Summary
RemoteConnection(InetSocketAddress remoteAddress, String method, String uri, String qs, ObjectConnection oc)
           
 
Method Summary
 void addHeader(String name, String value)
           
 void close()
          Called if not reading body.
 String getEnvelopeType()
           
 org.apache.http.HttpResponse getHttpResponse()
           
 int getResponseCode()
           
 String getResponseMessage()
           
 Object read(Type gtype, Class<?> rtype)
           
 InputStream readStream()
           
 String toString()
           
 void write(String media, Class<?> ptype, Type gtype, Object result)
           
 OutputStream writeStream()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteConnection

public RemoteConnection(InetSocketAddress remoteAddress,
                        String method,
                        String uri,
                        String qs,
                        ObjectConnection oc)
                 throws IOException
Throws:
IOException
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getEnvelopeType

public String getEnvelopeType()

addHeader

public void addHeader(String name,
                      String value)

writeStream

public OutputStream writeStream()
                         throws IOException
Throws:
IOException

write

public void write(String media,
                  Class<?> ptype,
                  Type gtype,
                  Object result)
           throws Exception
Throws:
Exception

getResponseCode

public int getResponseCode()
                    throws IOException
Throws:
IOException

getResponseMessage

public String getResponseMessage()
                          throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Called if not reading body.

Throws:
IOException

readStream

public InputStream readStream()
                       throws IOException
Throws:
IOException

read

public Object read(Type gtype,
                   Class<?> rtype)
            throws Exception
Throws:
Exception

getHttpResponse

public org.apache.http.HttpResponse getHttpResponse()
                                             throws IOException
Throws:
IOException


Copyright © 2004-2010 James Leigh Services Inc.. All Rights Reserved.