org.jclouds.chef.servlet
Class ChefRegistrationListener
java.lang.Object
org.jclouds.chef.servlet.ChefRegistrationListener
- All Implemented Interfaces:
- EventListener, javax.servlet.ServletContextListener
public class ChefRegistrationListener
- extends Object
- implements javax.servlet.ServletContextListener
Registers a new node in Chef and binds its name to
ChefConstants.CHEF_NODE, its role to ChefConstants.CHEF_ROLE
and the ChefService for the client to
ChefConstants.CHEF_SERVICE_CLIENT upon initialized. Deletes the node
and client when the context is destroyed.
- Author:
- Adrian Cole
|
Method Summary |
void |
contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
removes the node and client if found, and closes the client context. |
void |
contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChefRegistrationListener
public ChefRegistrationListener()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
- Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
- removes the node and client if found, and closes the client context.
- Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Copyright © 2013 jclouds. All Rights Reserved.