org.sapia.soto.ubik.monitor.impl
Class UbikMonitorAgentLayer

java.lang.Object
  extended by org.sapia.soto.ubik.monitor.impl.AbstractMonitorAgentLayer
      extended by org.sapia.soto.ubik.monitor.impl.UbikMonitorAgentLayer
All Implemented Interfaces:
java.rmi.Remote, EnvAware, Layer, MonitorConsts, MonitorAgent, org.sapia.ubik.mcast.AsyncEventListener, org.sapia.util.xml.confix.ObjectHandlerIF

public class UbikMonitorAgentLayer
extends AbstractMonitorAgentLayer
implements EnvAware, org.sapia.ubik.mcast.AsyncEventListener, MonitorConsts, java.rmi.Remote

This class extends the AbstractMonitorAgentLayer class and adds support for making its status check method call available remotely, using the Ubik distributed computing framework.

An instance of this class publishes itself over multicast to remote monitors by using an EventChannelinstance. In addition, it discovers appearing remote monitors through similar logic (in this case, it is remote monitors that publish their presence over multicast and are discovered by instances of this class).

In addition, an instance of this class detects if it has been started by a Corus server, and if so registers itself with Corus' process status notification mechanism.

Author:
yduchesne

Nested Class Summary
 
Nested classes/interfaces inherited from class org.sapia.soto.ubik.monitor.impl.AbstractMonitorAgentLayer
AbstractMonitorAgentLayer.Arg, AbstractMonitorAgentLayer.MethodDescriptor
 
Field Summary
 
Fields inherited from class org.sapia.soto.ubik.monitor.impl.AbstractMonitorAgentLayer
_method
 
Fields inherited from interface org.sapia.soto.ubik.monitor.impl.MonitorConsts
DISCO_ADMIN, DISCO_AGENT
 
Constructor Summary
UbikMonitorAgentLayer()
           
 
Method Summary
 void dispose()
           
 void init(ServiceMetaData meta)
           
protected  void lookupChannel()
           
 void onAsyncEvent(org.sapia.ubik.mcast.RemoteEvent evt)
           
protected  java.util.Properties postProcess(java.util.Properties props)
           
 void setEnv(Env env)
           
 void setEventChannel(EventChannelProvider channel)
          Sets the event channel to be used by this instance to perform publishing and discovery over multicast.
 void start(ServiceMetaData meta)
           
 
Methods inherited from class org.sapia.soto.ubik.monitor.impl.AbstractMonitorAgentLayer
checkStatus, createInvoke, handleObject, setId, setInvoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UbikMonitorAgentLayer

public UbikMonitorAgentLayer()
Method Detail

setEnv

public void setEnv(Env env)
Specified by:
setEnv in interface EnvAware

setEventChannel

public void setEventChannel(EventChannelProvider channel)
Sets the event channel to be used by this instance to perform publishing and discovery over multicast.

Parameters:
channel - an EventChannelProvider.

init

public void init(ServiceMetaData meta)
          throws java.lang.Exception
Specified by:
init in interface Layer
Overrides:
init in class AbstractMonitorAgentLayer
Throws:
java.lang.Exception

start

public void start(ServiceMetaData meta)
           throws java.lang.Exception
Specified by:
start in interface Layer
Overrides:
start in class AbstractMonitorAgentLayer
Throws:
java.lang.Exception

dispose

public void dispose()
Specified by:
dispose in interface Layer
Overrides:
dispose in class AbstractMonitorAgentLayer

onAsyncEvent

public void onAsyncEvent(org.sapia.ubik.mcast.RemoteEvent evt)
Specified by:
onAsyncEvent in interface org.sapia.ubik.mcast.AsyncEventListener

lookupChannel

protected void lookupChannel()
                      throws java.lang.Exception
Throws:
java.lang.Exception

postProcess

protected java.util.Properties postProcess(java.util.Properties props)
Specified by:
postProcess in class AbstractMonitorAgentLayer
Parameters:
props - status check result properties that are to be processed by inheriting classes (if required).
Returns:
the post-processed Properties.


Copyright © 2010 Sapia OSS. All Rights Reserved.