Rio Project 4.2 API Documentation



org.rioproject.monitor
Class ProvisionMonitorEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.jini.core.event.RemoteEvent
          extended by org.rioproject.event.RemoteServiceEvent
              extended by org.rioproject.monitor.ProvisionMonitorEvent
All Implemented Interfaces:
Serializable

public class ProvisionMonitorEvent
extends RemoteServiceEvent
implements Serializable

This class is used to communicate state changes on OperationalString and ServiceElements contained within OperationalString objects that are being monitored by the ProvisionMonitor. Interested event consumers register for event notification(s) and are notified as state changes occur relative to OperationalString and ServiceElements within OperationalString objects

Author:
Dennis Reedy
See Also:
Serialized Form

Nested Class Summary
static class ProvisionMonitorEvent.Action
           
 
Field Summary
static long ID
          Unique Event ID
 
Fields inherited from class org.rioproject.event.RemoteServiceEvent
date
 
Fields inherited from class net.jini.core.event.RemoteEvent
eventID, handback, seqNum, source
 
Constructor Summary
ProvisionMonitorEvent(Object source, ProvisionMonitorEvent.Action action, OperationalString opString)
          Create a ProvisionMonitorEvent for an OperationalString deployment or undeployment, update or OperationaStringManager change
ProvisionMonitorEvent(Object source, ProvisionMonitorEvent.Action action, ServiceElement sElem)
          Create a ProvisionMonitorEvent for a ServiceElement add, remove or change notification
ProvisionMonitorEvent(Object source, ProvisionMonitorEvent.Action action, String opStringName, ServiceElement sElem, ServiceBeanInstance instance)
          Create a ProvisionMonitorEvent indicating a service provision or failure notification
ProvisionMonitorEvent(Object source, String opStringName, ServiceBeanInstance instance)
          Create a ProvisionMonitorEvent indicating a ServiceBeanInstance has been updated
ProvisionMonitorEvent(Object source, String opStringName, ServiceElement sElem, ServiceBeanInstance instance, Object[] args)
          Create a ProvisionMonitorEvent indicating a redeployment request has been submitted
 
Method Summary
 ProvisionMonitorEvent.Action getAction()
          Get the action attribute
static EventDescriptor getEventDescriptor()
          Helper method to return the EventDescriptor for this event
 OperationalString getOperationalString()
          Get the OperationalString attribute.
 String getOperationalStringName()
          Get the OperationalString name.
 Object[] getRedeploymentParms()
          Get the Redeployment parameters
 ServiceBeanInstance getServiceBeanInstance()
          Get the ServiceBeanInstance
 ServiceElement getServiceElement()
          Get the ServiceElement attribute
 String toString()
           
 
Methods inherited from class org.rioproject.event.RemoteServiceEvent
getDate, setEventID, setHandback, setSequenceNumber
 
Methods inherited from class net.jini.core.event.RemoteEvent
getID, getRegistrationObject, getSequenceNumber
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final long ID
Unique Event ID

See Also:
Constant Field Values
Constructor Detail

ProvisionMonitorEvent

public ProvisionMonitorEvent(Object source,
                             ProvisionMonitorEvent.Action action,
                             ServiceElement sElem)
Create a ProvisionMonitorEvent for a ServiceElement add, remove or change notification

Parameters:
source - The source (originator) of the event
action - The type of ProvisionMonitorEvent
sElem - The ServiceElement that changed

ProvisionMonitorEvent

public ProvisionMonitorEvent(Object source,
                             ProvisionMonitorEvent.Action action,
                             OperationalString opString)
Create a ProvisionMonitorEvent for an OperationalString deployment or undeployment, update or OperationaStringManager change

Parameters:
source - The source (originator) of the event
action - The action the event represents
opString - The OperationalString undeployed

ProvisionMonitorEvent

public ProvisionMonitorEvent(Object source,
                             String opStringName,
                             ServiceBeanInstance instance)
Create a ProvisionMonitorEvent indicating a ServiceBeanInstance has been updated

Parameters:
source - The source (originator) of the event
opStringName - The name of the OperationalString
instance - The ServiceBeanInstance that changed

ProvisionMonitorEvent

public ProvisionMonitorEvent(Object source,
                             ProvisionMonitorEvent.Action action,
                             String opStringName,
                             ServiceElement sElem,
                             ServiceBeanInstance instance)
Create a ProvisionMonitorEvent indicating a service provision or failure notification

Parameters:
source - The source (originator) of the event
action - The action the evet represents
opStringName - The name of the OperationalString
sElem - The ServiceElement
instance - The ServiceBeanInstance

ProvisionMonitorEvent

public ProvisionMonitorEvent(Object source,
                             String opStringName,
                             ServiceElement sElem,
                             ServiceBeanInstance instance,
                             Object[] args)
Create a ProvisionMonitorEvent indicating a redeployment request has been submitted

Parameters:
source - The source (originator) of the event
opStringName - The name of the OperationalString
sElem - The ServiceElement
instance - The ServiceBeanInstance
args - Parameters for a redeployment
Method Detail

getAction

public ProvisionMonitorEvent.Action getAction()
Get the action attribute

Returns:
The action

getOperationalStringName

public String getOperationalStringName()
Get the OperationalString name.

Returns:
The name of the OperationalString associated with this event

getServiceElement

public ServiceElement getServiceElement()
Get the ServiceElement attribute

Returns:
The ServiceElement associated with this event. This property will be null if the action type is not SERVICE_ELEMENT_ADDED, SERVICE_ELEMENT_UPDATED, SERVICE_ELEMENT_REMOVED, SERVICE_PROVISIONED or SERVICE_FAILED. This property may be null if the action type is REDEPLOY_REQUEST

getOperationalString

public OperationalString getOperationalString()
Get the OperationalString attribute.

Returns:
The OperationalString associated with this event. This property will be null if the action type is not OPSTRING_DEPLOYED or OPSTRING_UNDEPLOYED

getServiceBeanInstance

public ServiceBeanInstance getServiceBeanInstance()
Get the ServiceBeanInstance

Returns:
The ServiceBeanInstance associated with this event. This property will be null if the action type is not SERVICE_BEAN_INSTANCE_UPDATED. This property may be null if the action type is REDEPLOY_REQUEST, SERVICE_PROVISIONED or SERVICE_FAILED

getRedeploymentParms

public Object[] getRedeploymentParms()
Get the Redeployment parameters

Returns:
The Redeployment parameters associated with this event. The Object array will have as it's content {Date.class, Boolean.class, ServiceProvisionListener.class}. This property will be null if the action type is not REDEPLOY_REQUEST

getEventDescriptor

public static EventDescriptor getEventDescriptor()
Helper method to return the EventDescriptor for this event

Returns:
The EventDescriptor for this event

toString

public String toString()
Overrides:
toString in class EventObject

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.