kaos.aci
Class ACIClient

java.lang.Object
  extended by kaos.aci.ACIClient
Direct Known Subclasses:
FlexfeedClient, MocketClient

public abstract class ACIClient
extends java.lang.Object

Author:
Administrator

Nested Class Summary
protected  class ACIClient.MocketConnectThread
           
protected  class ACIClient.ReceiverThread
           
 
Field Summary
protected  java.lang.String _host
           
protected  java.util.Vector _listeners
           
protected  StreamMocket _mocket
           
protected  int _port
           
protected  java.io.BufferedReader _reader
           
protected  java.util.Hashtable _resultTable
           
protected static boolean _serverIsLocal
           
protected  java.io.BufferedWriter _writer
           
static int DEFAULT_PORT
           
static java.lang.String OK_MESSAGE
           
protected static int RECONNECT_DELAY
           
static java.lang.String WARNING_MESSAGE
           
 
Constructor Summary
protected ACIClient(java.lang.String host, int port)
           
 
Method Summary
 void addPolicyUpdateListener(PolicyUpdateListener listener)
          Adds a listener which will be notified when policies have been updated
protected  void connectViaMocket()
           
protected  void connectViaSocket()
           
 boolean peerReachable(long timeSinceLastContact)
           
 boolean peerUnreachableWarning(long timeSinceLastContact)
           
 void removePolicyUpdateListener(PolicyUpdateListener listener)
          Adds a listener which will be notified when policies have been updated
protected  java.lang.Object satisfyRequest(MethodCallRequest request)
           
 void sendMessageToKPAT(java.lang.String message, java.lang.String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECONNECT_DELAY

protected static final int RECONNECT_DELAY
See Also:
Constant Field Values

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values

_serverIsLocal

protected static boolean _serverIsLocal

WARNING_MESSAGE

public static final java.lang.String WARNING_MESSAGE
See Also:
Constant Field Values

OK_MESSAGE

public static final java.lang.String OK_MESSAGE
See Also:
Constant Field Values

_resultTable

protected java.util.Hashtable _resultTable

_listeners

protected java.util.Vector _listeners

_reader

protected java.io.BufferedReader _reader

_writer

protected java.io.BufferedWriter _writer

_host

protected java.lang.String _host

_port

protected int _port

_mocket

protected StreamMocket _mocket
Constructor Detail

ACIClient

protected ACIClient(java.lang.String host,
                    int port)
Method Detail

addPolicyUpdateListener

public void addPolicyUpdateListener(PolicyUpdateListener listener)
Adds a listener which will be notified when policies have been updated


removePolicyUpdateListener

public void removePolicyUpdateListener(PolicyUpdateListener listener)
Adds a listener which will be notified when policies have been updated


sendMessageToKPAT

public void sendMessageToKPAT(java.lang.String message,
                              java.lang.String type)
                       throws java.lang.Exception
Throws:
java.lang.Exception

satisfyRequest

protected java.lang.Object satisfyRequest(MethodCallRequest request)
                                   throws java.io.IOException
Throws:
java.io.IOException

peerUnreachableWarning

public boolean peerUnreachableWarning(long timeSinceLastContact)

peerReachable

public boolean peerReachable(long timeSinceLastContact)

connectViaMocket

protected void connectViaMocket()
                         throws java.io.IOException
Throws:
java.io.IOException

connectViaSocket

protected void connectViaSocket()
                         throws java.io.IOException
Throws:
java.io.IOException