ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.beans.knn
Class JasNaiveBayesCentralAgent

java.lang.Object
  |
  +--com.ibm.able.AbleObject
        |
        +--com.ibm.able.AbleDefaultAgent
              |
              +--com.ibm.able.AbleRemoteDefaultAgent
                    |
                    +--com.ibm.able.platform.AblePlatformDefaultAgent
                          |
                          +--com.ibm.able.beans.knn.JasNaiveBayesCentralAgent
All Implemented Interfaces:
AbleAgent, AbleBean, AbleBeanContainer, AbleBeanRemoteContainer, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventListenerRemoteManager, AbleEventQueueManager, AbleEventQueueProcessor, AbleEventQueueRemoteManager, AblePlatformAgent, AblePropertyChangeManager, AbleRemoteAgent, AbleRemoteBean, AbleRemoteEventListener, AbleSerializable, AbleUserDefinedFunctionManager, AbleUserDefinedFunctionRemoteManager, java.util.EventListener, javax.agent.service.transport.MessageListener, java.beans.PropertyChangeListener, java.rmi.Remote, java.io.Serializable

public class JasNaiveBayesCentralAgent
extends AblePlatformDefaultAgent

This class defines a test for the AbleJasDefaultAgent object.

See Also:
Serialized Form

Fields inherited from class com.ibm.able.platform.AblePlatformDefaultAgent
agentLastUpdate, agentMovable, agentStatus, agentSummary, agentToAutoRegister, agentToBindToRmi, agentType, agentVendor, agentVersion, myAgentInboxes, myJasAbleLocator, myJasAgentAttributes, myJasAgentDescription, myJasAgentDirectoryService, myJasAgentName, myJasAgentNamingService, myJasDefaultLocator, myJasMessageTransportService, myJasServiceRoot, myJasTransportSystem, myJasVerifiableDirectoryService, myJasVerifiableNamingService, myKeyPair, myPrincipal, myReceiveMessageMethod, myRequestKey, mySecSppt, myTrustLevel, myVerifiableAgentName
 
Fields inherited from class com.ibm.able.AbleRemoteDefaultAgent
agentAddr, agentHost, agentName, defaultName, myRemoteStub
 
Fields inherited from class com.ibm.able.AbleDefaultAgent
activeDataSource, eventConnections, myBeans, numEpochs, processList, processListOK, userDefinedFunctions
 
Fields inherited from class com.ibm.able.AbleObject
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace
 
Constructor Summary
JasNaiveBayesCentralAgent()
          Create an AbleJasDefaultAgent tester object.
 
Method Summary
protected  void debugTrace(java.lang.String theMessage)
          Log a trace message.
 JasNaiveBayesDistributedAgent getAgent1()
          Get the distributed agent 1 bean
 JasNaiveBayesDistributedAgent getAgent2()
          Get the distributed agent 2 bean
 javax.agent.Locator getLclAbleDistrLocator1()
           
 javax.agent.Locator getLclAbleDistrLocator2()
           
 javax.agent.Locator getLclAbleMasterLocator1()
           
 javax.agent.Locator getLclAbleMasterLocator2()
           
 javax.agent.Locator getLclAbleMasterLocator3()
           
 javax.agent.Locator getLclAbleMasterLocator4()
           
 javax.agent.AgentName getLclAgentName1()
           
 javax.agent.AgentName getLclAgentName2()
           
 JasNaiveBayesDistributedAgent getLclJasNaiveBayesAgent1a()
          Get the first agent
 JasNaiveBayesDistributedAgent getLclJasNaiveBayesAgent2a()
          Get the second agent
 java.util.Hashtable[] getNaiveBayesFields1()
          Get the model 2 bean
 java.util.Hashtable[] getNaiveBayesFields2()
          Get the model 2 bean
 AbleFilter getNaiveBayesFil1()
          Get the filter 1 bean
 AbleFilter getNaiveBayesFil2()
          Get the filter 2 bean
 AbleImport getNaiveBayesImp2()
          Get the import 2 bean
 long getNumRec()
          Get numRecords in the test file
 java.lang.String getTestDataFileName()
          Get the name of the test/run data file
 void init()
          Initializes and configures the bean, but only if security is off; when security is on, calls to this method are ignored -- the method AblePlatformDefaultAgent.initializeAgent(AbleSecureKey) must be used instead.
static void main(java.lang.String[] args)
          Test the AbleJasDefaultAgent object.
 java.lang.Object processCentralAgent(java.lang.Object theArgs)
           
 java.lang.Object processDistrAgent1(java.lang.Object theArgs)
           
 java.lang.Object processDistrAgent2(java.lang.Object theArgs)
           
 void rcvMsgForBarBaz(javax.agent.TransportMessage theTransportMessage)
           
 void rcvMsgForFooBar(javax.agent.TransportMessage theTransportMessage)
           
 void receiveMessage(javax.agent.TransportMessage theTransportMessage)
          Handle receiving a message from the message transport service.
 void sendTo(javax.agent.Locator theDestinationLocator, javax.agent.AgentName theDestinationAgentName, java.lang.Object theMessage)
           
 void setMode(int mode)
           
 void setNumRec(long numRec)
          Set numRecords
 void setTestDataFileName(java.lang.String aFileName)
          Set the name of the test/run data file
 void someOtherRcvMsgMethod1(javax.agent.TransportMessage theTransportMessage)
           
 void someOtherRcvMsgMethod2(javax.agent.TransportMessage theTransportMessage)
           
 void someOtherRcvMsgMethod3(javax.agent.TransportMessage theTransportMessage)
           
 void someOtherRcvMsgMethod4(javax.agent.TransportMessage theTransportMessage)
           
 
Methods inherited from class com.ibm.able.platform.AblePlatformDefaultAgent
_init, _init, _quitAll, _reset, _resumeAll, _suspendAll, addAgentInbox, addJasAgentAttribute, broadcastTransportMessage, Copyright, createLocatorAndBindToMethod, getAgentAutonomyLevel, getAgentInboxes, getAgentLastUpdate, getAgentStatus, getAgentSummary, getAgentType, getAgentVendor, getAgentVersion, getAndSetAgentDescription, getAndSetAgentNames, getAndSetTransportServices, getAndValidateServiceRoot, getJasAgentAttributes, getJasAgentName, getNewAgentDescription, getPrincipal, getTransportMessageContent, getTransportMessageContent2, init, initializeAgent, initializeAgent, isAgentMovable, isAgentToAutoRegister, isAgentToBindToRmi, loadAgentDescriptionWithAbleAttributes, loadAgentDescriptionWithAbleLocator, loadAgentDescriptionWithAgentName, loadAgentDescriptionWithBaseLocators, loadAgentDescriptionWithPublicKey, loadAgentDescriptionWithUserAttributes, logException, lookUpAgent, lookUpAgent, maybeDeregisterWithAgentDirectoryService, maybeRebindToRmi, maybeRegisterWithAgentDirectoryService, maybeUnbindFromRmi, preInit, process, quitAgent, quitAll, removeAgentInbox, removeAgentInboxes, removeJasAgentAttribute, reset, resetAgent, resumeAgent, resumeAll, sendTransportMessage, sendTransportMessage, setAgentAutonomyLevel, setAgentAutonomyLevel, setAgentMovable, setAgentSummary, setAgentToAutoRegister, setAgentToBindToRmi, setAgentType, setAgentVendor, setAgentVersion, setPrincipal, setRequestKey, suspendAgent, suspendAll, toString, updateDescriptionWithAgentDirectoryService
 
Methods inherited from class com.ibm.able.AbleRemoteDefaultAgent
getAgentAddr, getAgentHost, getAgentName, rmiRebind, rmiUnbind
 
Methods inherited from class com.ibm.able.AbleDefaultAgent
addBean, addBeans, addEventConnection, addUserDefinedFunction, buildProcessList, clsNm, containsBean, containsBean, containsUserDefinedFunction, generateUniqueName, getBean, getBeans, getDataSource, getNumEpochs, getProcessList, getUserDefinedFunction, getUserDefinedFunctions, handleAbleEvent, invokeUserDefinedFunction, isActiveDataSource, process, propertyChange, quitEnabledEventProcessing, removeAllBeans, removeAllConnections, removeAllEventConnections, removeBean, removeBean, removeBeans, removeEventConnection, removeUserDefinedFunction, setActiveDataSource, setDataFlowEnabled, setProcessList, setUserDefinedFunctions
 
Methods inherited from class com.ibm.able.AbleObject
addAbleEventListener, addDestBufferConnection, addPropertyChangeListener, addPropertyConnection, addSourceBufferConnection, addStateChangeListener, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getComment, getDestBufferConnections, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getPropertyConnectionManager, getSleepTime, getSourceBufferConnections, getState, getTraceLogger, hasInputBuffer, hasOutputBuffer, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, processTimerEvent, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllPropertyConnections, removeDestBufferConnection, removePropertyChangeListener, removePropertyConnection, removeSourceBufferConnection, removeStateChangeListener, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setSleepTime, setState, setTimerEventProcessingEnabled, setTraceLogger, sourceConnectionsOK, startEnabledEventProcessing, suspendEnabledEventProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.able.AbleRemoteAgent
addEventConnection, getAgentAddr, getAgentHost, getAgentName, getDataSource, isActiveDataSource, removeEventConnection, setActiveDataSource
 
Methods inherited from interface com.ibm.able.AbleRemoteBean
getName, getState, process
 
Methods inherited from interface com.ibm.able.AbleRemoteEventListener
handleAbleEvent
 
Methods inherited from interface com.ibm.able.AbleEventListenerRemoteManager
addAbleEventListener, notifyAbleEventListeners, removeAbleEventListener
 
Methods inherited from interface com.ibm.able.AbleEventQueueRemoteManager
flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isTimerEventProcessingEnabled, quitEnabledEventProcessing, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing
 
Methods inherited from interface com.ibm.able.AbleBeanRemoteContainer
addBean, containsBean, containsBean, getBean, getBeans, removeAllBeans, removeBean, removeBean
 
Methods inherited from interface com.ibm.able.AbleUserDefinedFunctionRemoteManager
addUserDefinedFunction, containsUserDefinedFunction, getUserDefinedFunction, getUserDefinedFunctions, invokeUserDefinedFunction, removeUserDefinedFunction, setUserDefinedFunctions
 
Methods inherited from interface javax.agent.service.transport.MessageListener
equals, hashCode
 
Methods inherited from interface com.ibm.able.AbleBean
getComment, getLogger, getName, getParent, getState, getTraceLogger, isChanged, setChanged, setComment, setLogger, setName, setParent, setState, setTraceLogger
 
Methods inherited from interface com.ibm.able.AbleDataBufferManager
addDestBufferConnection, addSourceBufferConnection, getDestBufferConnections, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getSourceBufferConnections, hasInputBuffer, hasOutputBuffer, isConnectable, isDataFlowEnabled, processBufferConnections, removeAllBufferConnections, removeDestBufferConnection, removeSourceBufferConnection, setInputBuffer, setInputBuffer, setOutputBuffer, setOutputBuffer
 
Methods inherited from interface com.ibm.able.AbleEventListenerManager
addAbleEventListener, dataChanged, getAbleEventListeners, notifyAbleEventListeners, removeAbleEventListener
 
Methods inherited from interface com.ibm.able.AbleEventQueueManager
flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isTimerEventProcessingEnabled, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing
 
Methods inherited from interface com.ibm.able.AbleEventQueueProcessor
processAbleEvent, processNoEventProcessingEnabledSituation, processTimerEvent
 
Methods inherited from interface com.ibm.able.AblePropertyChangeManager
addPropertyChangeListener, addPropertyConnection, getPropertyConnectionManager, removeAllPropertyConnections, removePropertyChangeListener, removePropertyConnection
 
Methods inherited from interface com.ibm.able.AbleSerializable
getFileName, restoreFromFile, restoreFromFile, saveToFile, saveToFile, setFileName
 
Methods inherited from interface com.ibm.able.AbleBeanContainer
getName
 

Constructor Detail

JasNaiveBayesCentralAgent

public JasNaiveBayesCentralAgent()
                          throws java.rmi.RemoteException,
                                 AbleException
Create an AbleJasDefaultAgent tester object.
Method Detail

getAgent1

public JasNaiveBayesDistributedAgent getAgent1()
Get the distributed agent 1 bean

getAgent2

public JasNaiveBayesDistributedAgent getAgent2()
Get the distributed agent 2 bean

getNaiveBayesImp2

public AbleImport getNaiveBayesImp2()
Get the import 2 bean

getNaiveBayesFil1

public AbleFilter getNaiveBayesFil1()
Get the filter 1 bean

getNaiveBayesFil2

public AbleFilter getNaiveBayesFil2()
Get the filter 2 bean

getNaiveBayesFields1

public java.util.Hashtable[] getNaiveBayesFields1()
Get the model 2 bean

getNaiveBayesFields2

public java.util.Hashtable[] getNaiveBayesFields2()
Get the model 2 bean

getLclJasNaiveBayesAgent1a

public JasNaiveBayesDistributedAgent getLclJasNaiveBayesAgent1a()
Get the first agent

getLclJasNaiveBayesAgent2a

public JasNaiveBayesDistributedAgent getLclJasNaiveBayesAgent2a()
Get the second agent

getLclAbleMasterLocator1

public javax.agent.Locator getLclAbleMasterLocator1()

getLclAbleMasterLocator2

public javax.agent.Locator getLclAbleMasterLocator2()

getLclAbleMasterLocator3

public javax.agent.Locator getLclAbleMasterLocator3()

getLclAbleMasterLocator4

public javax.agent.Locator getLclAbleMasterLocator4()

getLclAbleDistrLocator1

public javax.agent.Locator getLclAbleDistrLocator1()

getLclAbleDistrLocator2

public javax.agent.Locator getLclAbleDistrLocator2()

getLclAgentName1

public javax.agent.AgentName getLclAgentName1()

getLclAgentName2

public javax.agent.AgentName getLclAgentName2()

init

public void init()
          throws AbleException
Description copied from class: AblePlatformDefaultAgent
Initializes and configures the bean, but only if security is off; when security is on, calls to this method are ignored -- the method AblePlatformDefaultAgent.initializeAgent(AbleSecureKey) must be used instead.
Overrides:
init in class AblePlatformDefaultAgent
Following copied from class: com.ibm.able.platform.AblePlatformDefaultAgent
Throws:
AbleException - On any error.

main

public static void main(java.lang.String[] args)
Test the AbleJasDefaultAgent object.
Parameters:
args - are ignored....


getNumRec

public long getNumRec()
Get numRecords in the test file

setNumRec

public void setNumRec(long numRec)
Set numRecords

setTestDataFileName

public void setTestDataFileName(java.lang.String aFileName)
                         throws AbleException
Set the name of the test/run data file

getTestDataFileName

public java.lang.String getTestDataFileName()
Get the name of the test/run data file

setMode

public void setMode(int mode)
             throws AbleException

receiveMessage

public void receiveMessage(javax.agent.TransportMessage theTransportMessage)
Handle receiving a message from the message transport service.

In this implementation, absolutely nothing happens.

Overrides:
receiveMessage in class AblePlatformDefaultAgent
Parameters:
theTransportMessage - A message from the Message Transport service.


processDistrAgent1

public java.lang.Object processDistrAgent1(java.lang.Object theArgs)

processDistrAgent2

public java.lang.Object processDistrAgent2(java.lang.Object theArgs)

sendTo

public void sendTo(javax.agent.Locator theDestinationLocator,
                   javax.agent.AgentName theDestinationAgentName,
                   java.lang.Object theMessage)
            throws AbleException

processCentralAgent

public java.lang.Object processCentralAgent(java.lang.Object theArgs)

someOtherRcvMsgMethod1

public void someOtherRcvMsgMethod1(javax.agent.TransportMessage theTransportMessage)

someOtherRcvMsgMethod2

public void someOtherRcvMsgMethod2(javax.agent.TransportMessage theTransportMessage)

someOtherRcvMsgMethod3

public void someOtherRcvMsgMethod3(javax.agent.TransportMessage theTransportMessage)

someOtherRcvMsgMethod4

public void someOtherRcvMsgMethod4(javax.agent.TransportMessage theTransportMessage)

rcvMsgForFooBar

public void rcvMsgForFooBar(javax.agent.TransportMessage theTransportMessage)

rcvMsgForBarBaz

public void rcvMsgForBarBaz(javax.agent.TransportMessage theTransportMessage)

debugTrace

protected void debugTrace(java.lang.String theMessage)
Log a trace message.
Overrides:
debugTrace in class AbleDefaultAgent
Parameters:
theMessage - A String containing text to be traced.


ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003