|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.exolab.core.ipc.Client
Client side ipc connections, must connect with a host and port option. An exception is thrown if the connection fails. Currently all sends have a 10 sec timeout, receives will block until data is available.
For the initial release a positive acknowlegment is used. Clients that initiate a send should then call receive to ensure an response is received.
TcpService,
Serialized Form| Constructor Summary | |
Client(java.lang.String host,
int port)
Connect to a server with the given port on the given host. |
|
| Method Summary | |
void |
close()
Close the existing service. |
java.lang.Object |
receive()
Wait for an Object to be received. |
void |
send(java.io.Serializable ob)
Send the specified object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Client(java.lang.String host,
int port)
throws java.rmi.UnknownHostException,
java.io.IOException
host - The host the service is running on.port - The connection port the server is listening on.
java.rmi.UnknownHostException - Cannot fine the given host.
java.io.IOException - Failed to connect to the server.| Method Detail |
public void send(java.io.Serializable ob)
throws java.io.IOException
ob - The object to send. Must be serializable.
java.io.IOException - If the data fails to write to the output stream.
public java.lang.Object receive()
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException - If the data cannot be received.
java.lang.ClassNotFoundException - If the object received is unknown.
public void close()
throws java.io.IOException
java.io.IOException - If the service fails to close.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||