Rio Project 4.2 API Documentation



org.rioproject.sla
Class SLAPolicyHandlerFactory

java.lang.Object
  extended by org.rioproject.sla.SLAPolicyHandlerFactory

public class SLAPolicyHandlerFactory
extends Object

A utility to create a SLAPolicyHandler based on a Configuration

Author:
Dennis Reedy

Constructor Summary
SLAPolicyHandlerFactory()
           
 
Method Summary
static SLAPolicyHandler create(SLA sla, Object eventSource, EventHandler eventHandler, ServiceBeanContext context, ClassLoader loader)
          Create a SLAPolicyHandler based on the provided SLA
static boolean slaPolicyHandlerChanged(SLA sla, SLAPolicyHandler handler)
          Determine if the provided SLAPolicyHandler is the same as the SLAPolicyHandler class configured as part of the SLA.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SLAPolicyHandlerFactory

public SLAPolicyHandlerFactory()
Method Detail

create

public static SLAPolicyHandler create(SLA sla,
                                      Object eventSource,
                                      EventHandler eventHandler,
                                      ServiceBeanContext context,
                                      ClassLoader loader)
                               throws Exception
Create a SLAPolicyHandler based on the provided SLA

Parameters:
sla - The SLA object to create an SLAPolicyHandler instance for
eventSource - The object to be used as the remote event source
eventHandler - Handler which sends events
context - The ServiceBeanContext
loader - A ClassLoader to load resources and classes, and to pass when constructing the SLAPolicyHandler. If null, the context class loader will be used.
Returns:
A SLAPolicyHandler created from the SLA
Throws:
Exception - If the configuration cannot be used

slaPolicyHandlerChanged

public static boolean slaPolicyHandlerChanged(SLA sla,
                                              SLAPolicyHandler handler)
Determine if the provided SLAPolicyHandler is the same as the SLAPolicyHandler class configured as part of the SLA.

Parameters:
sla - The SLA to use
handler - The SLAPolicyHandler
Returns:
true if the provided SLAPolicyHandler is the same as the SLAPolicyHandler class configured as part of the SLA

Copyright © Rio Project.

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