kaos.core.csi.usecase.legacy
Class LegacySystemClient

java.lang.Object
  extended by kaos.core.csi.KAoSActorImpl
      extended by kaos.core.csi.usecase.legacy.LegacySystemClient
All Implemented Interfaces:
KAoSActor

public class LegacySystemClient
extends kaos.core.csi.KAoSActorImpl

This class illustrates how a legacy client becomes KAoS-aware by simply inheriting from the KAoSActorImpl class, adding the "LegacySystemActorConcepts.LegacySystemUser()" ontological type to its KAoS description and registering with KAoS (all shown in the start() method).

Author:
KAoS Team $Revision: 1.3 $

Field Summary
 
Fields inherited from class kaos.core.csi.KAoSActorImpl
_actorDesc, _autoCommit, _lctr, _logger, _preferredTransportName, _propertiesToModify, _registered, _registration, _transports, _transportSupport
 
Constructor Summary
LegacySystemClient(java.lang.String[] args)
          Instantiates a new KAoS-aware LegacySystemClient using KAoS services for transport, naming, agent directory and policy enforcement.
LegacySystemClient(java.lang.String guid, java.lang.String name, java.util.Vector domainNames, Transport transport)
          Instantiates a new KAoS-aware LegacySystemClient using KAoS services for transport, naming, agent directory and policy enforcement.
 
Method Summary
static void main(java.lang.String[] args)
          Obtain a reference to the LegacySystem from the LegacySystemFactory.
 void requestActionFromLegacySystem(LegacySystem ss)
           
 void start()
          Add the "LegacySystemUser" ontological type to the description of this client that will be stored in the KAoS Directory Service.
 
Methods inherited from class kaos.core.csi.KAoSActorImpl
addCapability, addOntologicalType, addOntologicalType, addProperty, addProperty, addPropertyValue, addTransport, commitPropertyValues, deregisterFromKAoS, equals, getAgentDescription, getCapabilities, getConceptMappingName, getDomainNames, getEntityOntologicalTypeNames, getEntityOntologicalTypes, getGUID, getName, getProperties, getProperty, getPropertyValue, getTransport, getTransports, hashCode, initialize, initialize, initialize, isAutoPropertyValueCommit, isGuarded, isRegistered, logMessage, logMessage, printTransportMessage, receiveMessage, receiveMessage, registerWithKAoS, removeCapability, removeOntologicalType, removeProperty, removePropertyValue, removeTransport, sendMessage, sendMessage, setAutoPropertyValueCommit, setCapabilities, setConceptMappingName, setGUID, setMyDescription, setName, setOntologicalTypes, setProperties, setPropertyValue, setRegistered
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegacySystemClient

public LegacySystemClient(java.lang.String guid,
                          java.lang.String name,
                          java.util.Vector domainNames,
                          Transport transport)
                   throws java.lang.Exception
Instantiates a new KAoS-aware LegacySystemClient using KAoS services for transport, naming, agent directory and policy enforcement.

Parameters:
guid - String containing the unique id of the client.
name - String containing a nickname of the client.
domainNames - Vector containing the names of KAoS domains the client will register in.
transport - String containing the name of the transport to use in communication.
Throws:
java.lang.Exception - to be thrown when connection to KAoS services cannot be established.

LegacySystemClient

public LegacySystemClient(java.lang.String[] args)
                   throws java.lang.Exception
Instantiates a new KAoS-aware LegacySystemClient using KAoS services for transport, naming, agent directory and policy enforcement.

Parameters:
args - command line arguments containing the client's name, transport name and names of domains, in which the client will register. Example arguments: -name LegacyClient1 -transport tcp -domains LegacyDomain
Throws:
java.lang.Exception - to be thrown when connection to KAoS services cannot be established.
Method Detail

start

public void start()
           throws java.lang.Exception
Add the "LegacySystemUser" ontological type to the description of this client that will be stored in the KAoS Directory Service. Register this client with the KAoS Directory Service.

Throws:
java.lang.Exception - if the connection to the KAoS Directory Service cannot be established due to transport failure, or the Directory Service fails.

requestActionFromLegacySystem

public void requestActionFromLegacySystem(LegacySystem ss)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Obtain a reference to the LegacySystem from the LegacySystemFactory. Instantiate a LegacySystemClient and make it request a legacy action from the LegacySystem.

Parameters:
args - command line arguments containing the client's name, transport name and names of domains, in which the client will register. Example arguments: -name LegacyClient1 -transport tcp -domains LegacyDomain
Throws:
java.lang.Exception


Copyright © 2006 IHMC All Rights Reserved.