konark.manager
Class SMSAgentInterfaceProxy

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended bykonark.manager.SubscriberProxy
                  extended bykonark.manager.SMSAgentInterfaceProxy
All Implemented Interfaces:
Monitor, java.rmi.Remote, java.io.Serializable, SMSAgentInterface, Subscriber

public class SMSAgentInterfaceProxy
extends SubscriberProxy
implements SMSAgentInterface

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
SMSAgentInterfaceProxy(SMSAgentInterface a)
           
 
Method Summary
 void abortConfig(java.lang.String configHandle)
          Remote Interface method to abort a configuration
 void addAndLaunchAgents(java.lang.String filename, java.lang.String configHandle)
          Remote Interface method to launch an agent
 void addDetector(ajanta.naming.URN agentURN, java.lang.String eventDetector, java.lang.String eventHandler)
          Remote interface method to install an detector remotely
 void addEvent(EventDetector ed, EventHandler eh, java.util.Vector subscriberList)
           
 void addEvent(java.lang.String eventClassName, EventHandler eh, java.util.Vector subscriberList)
           
 void addEventDetector(java.lang.String eventClassName, EventDetector ed)
           
 void addEventHandler(java.lang.String eventClassName, EventHandler eh)
           
 void addNewSubscription(ajanta.naming.URN publisherURN, ajanta.naming.URN subscriberURN, java.lang.String eventName, java.lang.String eventHandler)
          Remote interface method to add a subscription to an agent
 void addSubscriber(java.lang.String eventClassName, java.util.Vector subscriberList)
           
 void agentReached(ajanta.naming.URN agentURN)
          Remote Interface method for synchronization.
 void deleteEvent(java.lang.String eventClassName)
           
 void deleteSubscriber(java.lang.String eventClassName, java.util.Vector subscriberList)
           
 void forceRun(ajanta.naming.URN agentURN)
          Remote Interface method for synchronization.
 java.util.Vector getConfigHandleList()
          Remote Interface method to get a list of config handles from an SMSAgent
 ConfigObject getConfigObject(java.lang.String configHandle)
          Remote interface method to get configuration object from an agent
 void launchConfig(java.lang.String configHandle)
          Proxy method to launch a configuration given the configuration id
 void launchConfigRestartMode(java.lang.String configHandle)
          Proxy method to launch a configuration in restart mode
 void modifyDetector(java.lang.String eventClassName, java.lang.Object[] object)
           
 void modifyDetectorOnAgent(ajanta.naming.URN agentURN, java.lang.String eventDetector, java.lang.Object[] object)
          Remote Interface method for modifying a detector on an agent
 void printRunningThreads()
           
 void readConfigFile(java.lang.String filename, java.lang.String configHandle)
          Proxy method to read a configuration file and set it to a configuration name/id/handle
 void registerForEvents(java.lang.String configHandle, java.lang.String url, java.util.Vector eventList)
          Remote Interface method to get interesting events from the broker
 void registerForHostStatusEvents(java.lang.String clientURL, java.util.Vector configHandles)
           
 void removeDetector(java.lang.String eventDetector)
           
 void removeDetectorOnAgent(ajanta.naming.URN agentURN, java.lang.String detectorName)
          Remote Interface method to remove a detector from an agent
 void removeSubscribeRelation(ajanta.naming.URN publisherURN, ajanta.naming.URN subscriberURN, java.lang.String eventName)
          Remote Interface method for removing an existing subscription relation
 void replaceEventDetector(java.lang.String eventClassName, EventDetector ed)
           
 void replaceEventHandler(java.lang.String eventClassName, EventHandler eh)
           
 void restoreDetector(EventDetector detector, EventHandler handler)
           
 void setAlarmLevel(java.lang.String eventClassName, int alarmLevel)
           
 void setAlertLevel(java.lang.String eventClassName, int alertLevel)
           
 void setBackupInfoForConfig(java.lang.String configHandle, java.lang.String baseDir, java.lang.String baseFileName)
           
 boolean startRun(ajanta.naming.URN agentURN)
          Remote Interface method for synchronization.
 boolean startSubscription(ajanta.naming.URN agentURN)
          Remote Interface method for synchronization.
 void stopAgent()
           
 void switchOffPrintRunningThreads()
           
 void terminateChildAgent(ajanta.naming.URN agentURN)
          Remote Interface method to terminate an agent
 void test(java.lang.String event)
           
 void unregisterForAllHostStatusEvents(java.lang.String clientURL)
           
 void unregisterForEvents(java.lang.String configHandle, java.lang.String url, java.util.Vector v)
          Remote Interface method to get unregister receiving of events
 
Methods inherited from class konark.manager.SubscriberProxy
addSubscription, removeSubscription, report, resubscribe, subscribeEvent, subscribeEvent, unsubscribeEvent
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface konark.manager.Subscriber
addSubscription, removeSubscription, report, resubscribe, subscribeEvent, subscribeEvent, unsubscribeEvent
 

Constructor Detail

SMSAgentInterfaceProxy

public SMSAgentInterfaceProxy(SMSAgentInterface a)
                       throws java.rmi.RemoteException
Method Detail

test

public void test(java.lang.String event)
          throws java.rmi.RemoteException
Specified by:
test in interface SMSAgentInterface
Parameters:
event -
Throws:
java.rmi.RemoteException

readConfigFile

public void readConfigFile(java.lang.String filename,
                           java.lang.String configHandle)
                    throws java.lang.Exception
Proxy method to read a configuration file and set it to a configuration name/id/handle

Specified by:
readConfigFile in interface SMSAgentInterface
Parameters:
filename -
configHandle -
Throws:
java.lang.Exception

launchConfig

public void launchConfig(java.lang.String configHandle)
                  throws java.lang.Exception
Proxy method to launch a configuration given the configuration id

Specified by:
launchConfig in interface SMSAgentInterface
Parameters:
configHandle -
Throws:
java.lang.Exception

setBackupInfoForConfig

public void setBackupInfoForConfig(java.lang.String configHandle,
                                   java.lang.String baseDir,
                                   java.lang.String baseFileName)
                            throws java.lang.Exception
Specified by:
setBackupInfoForConfig in interface SMSAgentInterface
Throws:
java.lang.Exception

launchConfigRestartMode

public void launchConfigRestartMode(java.lang.String configHandle)
                             throws java.lang.Exception
Proxy method to launch a configuration in restart mode

Specified by:
launchConfigRestartMode in interface SMSAgentInterface
Parameters:
configHandle -
Throws:
java.lang.Exception

addDetector

public void addDetector(ajanta.naming.URN agentURN,
                        java.lang.String eventDetector,
                        java.lang.String eventHandler)
                 throws java.lang.Exception
Remote interface method to install an detector remotely

Specified by:
addDetector in interface SMSAgentInterface
Parameters:
agentURN -
eventDetector -
eventHandler -
Throws:
java.lang.Exception

addNewSubscription

public void addNewSubscription(ajanta.naming.URN publisherURN,
                               ajanta.naming.URN subscriberURN,
                               java.lang.String eventName,
                               java.lang.String eventHandler)
                        throws java.lang.Exception
Remote interface method to add a subscription to an agent

Specified by:
addNewSubscription in interface SMSAgentInterface
Parameters:
publisherURN -
subscriberURN -
eventName -
eventHandler -
Throws:
java.lang.Exception

getConfigObject

public ConfigObject getConfigObject(java.lang.String configHandle)
                             throws java.lang.Exception
Remote interface method to get configuration object from an agent

Specified by:
getConfigObject in interface SMSAgentInterface
Parameters:
configHandle -
Throws:
java.lang.Exception

addAndLaunchAgents

public void addAndLaunchAgents(java.lang.String filename,
                               java.lang.String configHandle)
                        throws java.lang.Exception
Remote Interface method to launch an agent

Specified by:
addAndLaunchAgents in interface SMSAgentInterface
Parameters:
filename -
configHandle -
Throws:
java.lang.Exception

agentReached

public void agentReached(ajanta.naming.URN agentURN)
                  throws java.lang.Exception
Remote Interface method for synchronization.

Specified by:
agentReached in interface SMSAgentInterface
Parameters:
agentURN -
Throws:
java.lang.Exception

startRun

public boolean startRun(ajanta.naming.URN agentURN)
                 throws java.lang.Exception
Remote Interface method for synchronization.

Specified by:
startRun in interface SMSAgentInterface
Parameters:
agentURN -
Throws:
java.lang.Exception

startSubscription

public boolean startSubscription(ajanta.naming.URN agentURN)
                          throws java.lang.Exception
Remote Interface method for synchronization.

Specified by:
startSubscription in interface SMSAgentInterface
Parameters:
agentURN -
Throws:
java.lang.Exception

forceRun

public void forceRun(ajanta.naming.URN agentURN)
              throws java.lang.Exception
Remote Interface method for synchronization.

Specified by:
forceRun in interface SMSAgentInterface
Parameters:
agentURN -
Throws:
java.lang.Exception

getConfigHandleList

public java.util.Vector getConfigHandleList()
                                     throws java.lang.Exception
Description copied from interface: SMSAgentInterface
Remote Interface method to get a list of config handles from an SMSAgent

Specified by:
getConfigHandleList in interface SMSAgentInterface
Throws:
java.lang.Exception

modifyDetectorOnAgent

public void modifyDetectorOnAgent(ajanta.naming.URN agentURN,
                                  java.lang.String eventDetector,
                                  java.lang.Object[] object)
                           throws java.lang.Exception
Remote Interface method for modifying a detector on an agent

Specified by:
modifyDetectorOnAgent in interface SMSAgentInterface
Parameters:
agentURN -
eventDetector -
object -
Throws:
java.lang.Exception

removeSubscribeRelation

public void removeSubscribeRelation(ajanta.naming.URN publisherURN,
                                    ajanta.naming.URN subscriberURN,
                                    java.lang.String eventName)
                             throws java.lang.Exception
Remote Interface method for removing an existing subscription relation

Specified by:
removeSubscribeRelation in interface SMSAgentInterface
Parameters:
publisherURN -
subscriberURN -
eventName -
Throws:
java.lang.Exception

removeDetectorOnAgent

public void removeDetectorOnAgent(ajanta.naming.URN agentURN,
                                  java.lang.String detectorName)
                           throws java.lang.Exception
Remote Interface method to remove a detector from an agent

Specified by:
removeDetectorOnAgent in interface SMSAgentInterface
Throws:
java.lang.Exception

terminateChildAgent

public void terminateChildAgent(ajanta.naming.URN agentURN)
                         throws java.lang.Exception
Description copied from interface: SMSAgentInterface
Remote Interface method to terminate an agent

Specified by:
terminateChildAgent in interface SMSAgentInterface
Throws:
java.lang.Exception

abortConfig

public void abortConfig(java.lang.String configHandle)
                 throws java.lang.Exception
Description copied from interface: SMSAgentInterface
Remote Interface method to abort a configuration

Specified by:
abortConfig in interface SMSAgentInterface
Throws:
java.lang.Exception

stopAgent

public void stopAgent()
               throws java.rmi.RemoteException
Specified by:
stopAgent in interface Monitor
Throws:
java.rmi.RemoteException

registerForEvents

public void registerForEvents(java.lang.String configHandle,
                              java.lang.String url,
                              java.util.Vector eventList)
                       throws java.lang.Exception
Description copied from interface: SMSAgentInterface
Remote Interface method to get interesting events from the broker

Specified by:
registerForEvents in interface SMSAgentInterface
Throws:
java.lang.Exception

unregisterForEvents

public void unregisterForEvents(java.lang.String configHandle,
                                java.lang.String url,
                                java.util.Vector v)
                         throws java.lang.Exception
Description copied from interface: SMSAgentInterface
Remote Interface method to get unregister receiving of events

Specified by:
unregisterForEvents in interface SMSAgentInterface
Throws:
java.lang.Exception

registerForHostStatusEvents

public void registerForHostStatusEvents(java.lang.String clientURL,
                                        java.util.Vector configHandles)
                                 throws java.lang.Exception
Specified by:
registerForHostStatusEvents in interface SMSAgentInterface
Throws:
java.lang.Exception

unregisterForAllHostStatusEvents

public void unregisterForAllHostStatusEvents(java.lang.String clientURL)
                                      throws java.lang.Exception
Specified by:
unregisterForAllHostStatusEvents in interface SMSAgentInterface
Throws:
java.lang.Exception

deleteEvent

public void deleteEvent(java.lang.String eventClassName)
                 throws java.rmi.RemoteException
Specified by:
deleteEvent in interface Monitor
Parameters:
eventClassName -
Throws:
java.rmi.RemoteException

addEvent

public void addEvent(EventDetector ed,
                     EventHandler eh,
                     java.util.Vector subscriberList)
              throws java.rmi.RemoteException,
                     java.rmi.AlreadyBoundException
Specified by:
addEvent in interface Monitor
Parameters:
ed - Event Detector to be installed on the agent.
Throws:
java.rmi.RemoteException
java.rmi.AlreadyBoundException

addEvent

public void addEvent(java.lang.String eventClassName,
                     EventHandler eh,
                     java.util.Vector subscriberList)
              throws java.rmi.RemoteException,
                     java.rmi.AlreadyBoundException
Specified by:
addEvent in interface Monitor
Parameters:
eventClassName -
Throws:
java.rmi.RemoteException
java.rmi.AlreadyBoundException

deleteSubscriber

public void deleteSubscriber(java.lang.String eventClassName,
                             java.util.Vector subscriberList)
                      throws java.rmi.RemoteException
Specified by:
deleteSubscriber in interface Monitor
Parameters:
eventClassName -
subscriberList -
Throws:
java.rmi.RemoteException

addSubscriber

public void addSubscriber(java.lang.String eventClassName,
                          java.util.Vector subscriberList)
                   throws java.rmi.RemoteException
Specified by:
addSubscriber in interface Monitor
Parameters:
eventClassName -
subscriberList -
Throws:
java.rmi.RemoteException

removeDetector

public void removeDetector(java.lang.String eventDetector)
                    throws java.rmi.RemoteException
Specified by:
removeDetector in interface Monitor
Parameters:
eventDetector -
Throws:
java.rmi.RemoteException

addEventHandler

public void addEventHandler(java.lang.String eventClassName,
                            EventHandler eh)
                     throws java.rmi.RemoteException
Specified by:
addEventHandler in interface Monitor
Parameters:
eventClassName -
eh -
Throws:
java.rmi.RemoteException

replaceEventHandler

public void replaceEventHandler(java.lang.String eventClassName,
                                EventHandler eh)
                         throws java.rmi.RemoteException
Specified by:
replaceEventHandler in interface Monitor
Parameters:
eventClassName -
eh -
Throws:
java.rmi.RemoteException

addEventDetector

public void addEventDetector(java.lang.String eventClassName,
                             EventDetector ed)
                      throws java.rmi.RemoteException
Specified by:
addEventDetector in interface Monitor
Parameters:
eventClassName -
ed -
Throws:
java.rmi.RemoteException

replaceEventDetector

public void replaceEventDetector(java.lang.String eventClassName,
                                 EventDetector ed)
                          throws java.rmi.RemoteException
Specified by:
replaceEventDetector in interface Monitor
Parameters:
eventClassName -
ed -
Throws:
java.rmi.RemoteException

modifyDetector

public void modifyDetector(java.lang.String eventClassName,
                           java.lang.Object[] object)
                    throws java.rmi.RemoteException
Specified by:
modifyDetector in interface Monitor
Parameters:
eventClassName -
object -
Throws:
java.rmi.RemoteException

printRunningThreads

public void printRunningThreads()
                         throws java.rmi.RemoteException
Specified by:
printRunningThreads in interface Monitor
Throws:
java.rmi.RemoteException

switchOffPrintRunningThreads

public void switchOffPrintRunningThreads()
                                  throws java.rmi.RemoteException
Specified by:
switchOffPrintRunningThreads in interface Monitor
Throws:
java.rmi.RemoteException

restoreDetector

public void restoreDetector(EventDetector detector,
                            EventHandler handler)
                     throws java.rmi.RemoteException
Specified by:
restoreDetector in interface Monitor
Throws:
java.rmi.RemoteException

setAlarmLevel

public void setAlarmLevel(java.lang.String eventClassName,
                          int alarmLevel)
                   throws java.rmi.RemoteException
Specified by:
setAlarmLevel in interface Monitor
Parameters:
eventClassName -
alarmLevel -
Throws:
java.rmi.RemoteException

setAlertLevel

public void setAlertLevel(java.lang.String eventClassName,
                          int alertLevel)
                   throws java.rmi.RemoteException
Specified by:
setAlertLevel in interface Monitor
Parameters:
eventClassName -
alertLevel -
Throws:
java.rmi.RemoteException