org.ogf.graap.wsag.server.monitoring
Class MonitoringContext

java.lang.Object
  extended by org.ogf.graap.wsag.server.monitoring.MonitoringContext
All Implemented Interfaces:
IMonitoringContext

public class MonitoringContext
extends Object
implements IMonitoringContext

MonitoringContext

Author:
Oliver Waeldrich

Field Summary
 
Fields inherited from interface org.ogf.graap.wsag.server.monitoring.IMonitoringContext
WSAG4J_AGREEMENT_EXECUTION_CONTEXT
 
Constructor Summary
MonitoringContext()
           
 
Method Summary
 void addMonitoringHandler(IServiceTermMonitoringHandler handler)
          Adds a service term monitoring handler to this context.
 void addServiceTemState(ServiceTermStateType state)
          Adds a new service term state to the state monitor.
 void addServiceTemState(String name)
          Adds a new service term state with the given name to the state monitor.
 Object clone()
          Creates and returns a copy of this object.
 IAccountingSystem getAccountingSystem()
          Retrieves the accounting system that is used with this monitoring context.
 IServiceTermMonitoringHandler[] getMonitoringHandler()
          Gets all service term monitoring handler for this context.
 Map<String,org.apache.xmlbeans.XmlObject> getProperties()
          
 ServiceTermStateType getServiceTermStateByName(String name)
          Returns the service term state with the given name, or null if no term state with this name is registered.
 ServiceTermStateType[] getServiceTermStates()
          Returns an array of the registered service term states
 Map<String,Object> getTransientProperties()
          
 void removeMonitoringHandler(IServiceTermMonitoringHandler handler)
          Removes a service term monitoring handler from this context.
 void removeServiceTemState(ServiceTermStateType state)
          Removes a service term state from the state monitor.
 void setAccountingSystem(IAccountingSystem accountingSystem)
          Sets the accounting system.
 void setMonitoringHandler(IServiceTermMonitoringHandler[] handler)
          Sets the service term monitoring handler for this context.
 void setProperties(Map<String,org.apache.xmlbeans.XmlObject> properties)
          
 void setServiceTemState(ServiceTermStateType[] states)
          Adds the given service term state for monitoring to the context.
 void setTransientProperties(Map<String,Object> properties)
          
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonitoringContext

public MonitoringContext()
Method Detail

addServiceTemState

public void addServiceTemState(String name)
Adds a new service term state with the given name to the state monitor. The state is initialized as NOT_READY.

Specified by:
addServiceTemState in interface IMonitoringContext
Parameters:
name - the name of the state the state to add

addServiceTemState

public void addServiceTemState(ServiceTermStateType state)
Adds a new service term state to the state monitor.

Specified by:
addServiceTemState in interface IMonitoringContext
Parameters:
state - the state to add

getServiceTermStates

public ServiceTermStateType[] getServiceTermStates()
Returns an array of the registered service term states

Specified by:
getServiceTermStates in interface IMonitoringContext
Returns:
the registered service term states

removeServiceTemState

public void removeServiceTemState(ServiceTermStateType state)
Removes a service term state from the state monitor.

Parameters:
state - the state to remove

setServiceTemState

public void setServiceTemState(ServiceTermStateType[] states)
Adds the given service term state for monitoring to the context.

Specified by:
setServiceTemState in interface IMonitoringContext
Parameters:
states - the state array to set
See Also:
IMonitoringContext.setServiceTemState(ServiceTermStateType[])

getServiceTermStateByName

public ServiceTermStateType getServiceTermStateByName(String name)
Returns the service term state with the given name, or null if no term state with this name is registered.

Specified by:
getServiceTermStateByName in interface IMonitoringContext
Parameters:
name - the name of the service term state
Returns:
the service term state with the given name

getProperties

public Map<String,org.apache.xmlbeans.XmlObject> getProperties()

Specified by:
getProperties in interface IMonitoringContext
Returns:
the properties defined for this monitoring context
See Also:
IMonitoringContext.getProperties()

setProperties

public void setProperties(Map<String,org.apache.xmlbeans.XmlObject> properties)

Specified by:
setProperties in interface IMonitoringContext
Parameters:
properties - the monitoring properties to set
See Also:
IMonitoringContext.setProperties(java.util.Map)

getTransientProperties

public Map<String,Object> getTransientProperties()

Specified by:
getTransientProperties in interface IMonitoringContext
Returns:
the transient properties defined for this monitoring context
See Also:
IMonitoringContext.getTransientProperties()

setTransientProperties

public void setTransientProperties(Map<String,Object> properties)

Specified by:
setTransientProperties in interface IMonitoringContext
Parameters:
properties - the monitoring transient properties to set
See Also:
IMonitoringContext.setTransientProperties(java.util.Map)

addMonitoringHandler

public void addMonitoringHandler(IServiceTermMonitoringHandler handler)
Adds a service term monitoring handler to this context.

Specified by:
addMonitoringHandler in interface IMonitoringContext
Parameters:
handler - the handler to add
See Also:
IMonitoringContext.addMonitoringHandler(IServiceTermMonitoringHandler)

getMonitoringHandler

public IServiceTermMonitoringHandler[] getMonitoringHandler()
Gets all service term monitoring handler for this context.

Specified by:
getMonitoringHandler in interface IMonitoringContext
Returns:
the service term monitoring handler for this context
See Also:
IMonitoringContext.getMonitoringHandler()

removeMonitoringHandler

public void removeMonitoringHandler(IServiceTermMonitoringHandler handler)
Removes a service term monitoring handler from this context.

Specified by:
removeMonitoringHandler in interface IMonitoringContext
Parameters:
handler - the handler to remove
See Also:
IMonitoringContext.removeMonitoringHandler(IServiceTermMonitoringHandler)

setMonitoringHandler

public void setMonitoringHandler(IServiceTermMonitoringHandler[] handler)
Sets the service term monitoring handler for this context.

Specified by:
setMonitoringHandler in interface IMonitoringContext
Parameters:
handler - the handlers to set
See Also:
IMonitoringContext.setMonitoringHandler(IServiceTermMonitoringHandler[])

clone

public Object clone()
Creates and returns a copy of this object.

Specified by:
clone in interface IMonitoringContext
Overrides:
clone in class Object
Returns:
a coned copy of this instance
See Also:
HashMap.clone()

setAccountingSystem

public void setAccountingSystem(IAccountingSystem accountingSystem)
Sets the accounting system.

Specified by:
setAccountingSystem in interface IMonitoringContext
Parameters:
accountingSystem - the accountingSystem to set

getAccountingSystem

public IAccountingSystem getAccountingSystem()
Description copied from interface: IMonitoringContext
Retrieves the accounting system that is used with this monitoring context.

Specified by:
getAccountingSystem in interface IMonitoringContext
Returns:
the accountingSystem


Copyright © 2008-2012. All Rights Reserved.