org.sapia.ubik.rmi.server.transport.http
Class HttpRmiClientConnection

java.lang.Object
  extended by org.sapia.ubik.rmi.server.transport.http.HttpRmiClientConnection
All Implemented Interfaces:
Connection, RmiConnection

public class HttpRmiClientConnection
extends java.lang.Object
implements RmiConnection

Implements the RmiConnection interface over HTTP - more precisely, over a Jakarta HTTP client. Data is sent using the POST method.

An instance of this class is used on the client side.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2004 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site
See Also:
HttpRmiServerConnection

Constructor Summary
HttpRmiClientConnection()
          Creates an instance of this class with the given HTTP client and uri to connect to.
 
Method Summary
 void close()
          Closes this connection.
 ServerAddress getServerAddress()
          Returns "address" of the server with which this connection communicates.
 java.lang.Object receive()
          Receives an object from the server with which this connection communicates.
 void send(java.lang.Object o)
          Sends the given object to the server with which this connection communicates.
 void send(java.lang.Object o, VmId associated, java.lang.String transportType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRmiClientConnection

public HttpRmiClientConnection()
Creates an instance of this class with the given HTTP client and uri to connect to.

Method Detail

send

public void send(java.lang.Object o,
                 VmId associated,
                 java.lang.String transportType)
          throws java.io.IOException,
                 java.rmi.RemoteException
Specified by:
send in interface RmiConnection
Throws:
java.io.IOException
java.rmi.RemoteException
See Also:
RmiConnection.send(java.lang.Object, org.sapia.ubik.rmi.server.VmId, java.lang.String)

close

public void close()
Description copied from interface: Connection
Closes this connection.

Specified by:
close in interface Connection
See Also:
Connection.close()

getServerAddress

public ServerAddress getServerAddress()
Description copied from interface: Connection
Returns "address" of the server with which this connection communicates.

Specified by:
getServerAddress in interface Connection
Returns:
a ServerAddress.
See Also:
Connection.getServerAddress()

receive

public java.lang.Object receive()
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException,
                                java.rmi.RemoteException
Description copied from interface: Connection
Receives an object from the server with which this connection communicates.

Specified by:
receive in interface Connection
Returns:
an Object.
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.rmi.RemoteException
See Also:
Connection.receive()

send

public void send(java.lang.Object o)
          throws java.io.IOException,
                 java.rmi.RemoteException
Description copied from interface: Connection
Sends the given object to the server with which this connection communicates.

Specified by:
send in interface Connection
Throws:
java.io.IOException
java.rmi.RemoteException
See Also:
Connection.send(java.lang.Object)


Copyright © 2010 Sapia OSS. All Rights Reserved.