com.interfaceware.chameleon
Class Client

java.lang.Object
  extended by com.interfaceware.chameleon.Client

public class Client
extends java.lang.Object

This class allows you to connect to hosts and send messages


Constructor Summary
Client()
          Create a Client
 
Method Summary
 void CloseConnection()
          Close a connection
 void Connect(java.lang.String Host, int Port)
          Connect to a remote host.
protected  void finalize()
          Frees the table handle.
 void OnClose(int TransportId)
          called when a connection closes
 void OnConnect(int TransportId)
          called when a connection has been established
 void OnMessage(int TransportId, java.lang.String Message)
          called when a message arrives
 void OnTransportError(int TransportId, int ErrorId, java.lang.String ErrorMessage)
          called when an error occurs
 void SendMessage(java.lang.String Message)
          Send a message
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client()
Create a Client

Throws:
ChameleonException
Method Detail

finalize

protected void finalize()
                 throws ChameleonException
Frees the table handle.

Overrides:
finalize in class java.lang.Object
Throws:
ChameleonException

Connect

public void Connect(java.lang.String Host,
                    int Port)
             throws ChameleonException
Connect to a remote host.

Throws:
ChameleonException

SendMessage

public void SendMessage(java.lang.String Message)
                 throws ChameleonException
Send a message

Throws:
ChameleonException

CloseConnection

public void CloseConnection()
                     throws ChameleonException
Close a connection

Throws:
ChameleonException

OnClose

public void OnClose(int TransportId)
called when a connection closes


OnMessage

public void OnMessage(int TransportId,
                      java.lang.String Message)
called when a message arrives


OnTransportError

public void OnTransportError(int TransportId,
                             int ErrorId,
                             java.lang.String ErrorMessage)
called when an error occurs


OnConnect

public void OnConnect(int TransportId)
called when a connection has been established