net.anotheria.net.tcp.client.object2object
Class O2OClientConnection

java.lang.Object
  extended by net.anotheria.net.shared.server.AbstractConnection
      extended by net.anotheria.net.tcp.client.object2object.O2OClientConnection
All Implemented Interfaces:
IConnection

public class O2OClientConnection
extends AbstractConnection

A connection which is capable of sending objects. Client side.

Author:
lrosenberg

Constructor Summary
O2OClientConnection(String aHost, int aPort)
           
 
Method Summary
 void close()
          Closes a conection.
 O2OClientConnection connect()
           
static O2OClientConnection createConnection(String host, int port)
           
 void open()
          Opens a connection.
 Object sendObjectAndReturnResult(Object toSend)
           
 
Methods inherited from class net.anotheria.net.shared.server.AbstractConnection
addConnectionListener, removeConnectionListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

O2OClientConnection

public O2OClientConnection(String aHost,
                           int aPort)
Method Detail

connect

public O2OClientConnection connect()
                            throws UnknownHostException,
                                   IOException
Throws:
UnknownHostException
IOException

open

public void open()
Description copied from interface: IConnection
Opens a connection.

Specified by:
open in interface IConnection
Overrides:
open in class AbstractConnection

close

public void close()
Description copied from interface: IConnection
Closes a conection.

Specified by:
close in interface IConnection
Overrides:
close in class AbstractConnection

createConnection

public static O2OClientConnection createConnection(String host,
                                                   int port)
                                            throws UnknownHostException,
                                                   IOException
Throws:
UnknownHostException
IOException

sendObjectAndReturnResult

public Object sendObjectAndReturnResult(Object toSend)
                                 throws IOException,
                                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException


Copyright © 2010-2013 anotheria.net. All Rights Reserved.