org.fusesource.fabric.bridge.zk.internal
Class AbstractZkManagedServiceFactory

java.lang.Object
  extended by org.fusesource.fabric.bridge.zk.internal.AbstractZkManagedServiceFactory
All Implemented Interfaces:
org.osgi.service.cm.ManagedServiceFactory
Direct Known Subclasses:
ZkManagedBridgeServiceFactory, ZkManagedGatewayServiceFactory

public abstract class AbstractZkManagedServiceFactory
extends java.lang.Object
implements org.osgi.service.cm.ManagedServiceFactory

Base ManagedServiceFactory for Fabric ZkBridgeConnector and ZkGatewayConnector.

Author:
Dhiraj Bokde
See Also:
ZkManagedBridgeServiceFactory, ZkManagedGatewayServiceFactory

Field Summary
protected  org.slf4j.Logger LOG
           
protected  java.util.Map<java.lang.String,java.util.List<org.osgi.framework.ServiceReference>> serviceReferenceMap
           
 
Constructor Summary
AbstractZkManagedServiceFactory()
           
 
Method Summary
protected  org.springframework.context.ApplicationContext createApplicationContext(java.lang.String pid)
           
protected  BrokerConfig createBrokerConfig(java.lang.String pid, java.lang.String prefix, java.util.Dictionary<java.lang.String,java.lang.String> properties)
           
protected  BridgeDestinationsConfig createDestinationsConfig(java.lang.String pid, java.lang.String destinationsRef)
           
 void deleted(java.lang.String pid)
           
 void destroy()
           
protected abstract  void doDeleted(java.lang.String pid)
           
protected abstract  void doDestroy()
           
 org.osgi.framework.BundleContext getBundleContext()
           
 FabricService getFabricService()
           
 org.linkedin.zookeeper.client.IZKClient getZooKeeper()
           
 void init()
           
 void setBundleContext(org.osgi.framework.BundleContext bundleContext)
           
 void setFabricService(FabricService fabricService)
           
 void setZooKeeper(org.linkedin.zookeeper.client.IZKClient zooKeeper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.osgi.service.cm.ManagedServiceFactory
getName, updated
 

Field Detail

LOG

protected final org.slf4j.Logger LOG

serviceReferenceMap

protected java.util.Map<java.lang.String,java.util.List<org.osgi.framework.ServiceReference>> serviceReferenceMap
Constructor Detail

AbstractZkManagedServiceFactory

public AbstractZkManagedServiceFactory()
Method Detail

init

public final void init()
                throws java.lang.Exception
Throws:
java.lang.Exception

destroy

public final void destroy()
                   throws java.lang.Exception
Throws:
java.lang.Exception

doDestroy

protected abstract void doDestroy()
                           throws java.lang.Exception
Throws:
java.lang.Exception

deleted

public final void deleted(java.lang.String pid)
Specified by:
deleted in interface org.osgi.service.cm.ManagedServiceFactory

doDeleted

protected abstract void doDeleted(java.lang.String pid)

createDestinationsConfig

protected BridgeDestinationsConfig createDestinationsConfig(java.lang.String pid,
                                                            java.lang.String destinationsRef)
                                                     throws org.osgi.service.cm.ConfigurationException
Throws:
org.osgi.service.cm.ConfigurationException

createBrokerConfig

protected BrokerConfig createBrokerConfig(java.lang.String pid,
                                          java.lang.String prefix,
                                          java.util.Dictionary<java.lang.String,java.lang.String> properties)
                                   throws org.osgi.service.cm.ConfigurationException
Throws:
org.osgi.service.cm.ConfigurationException

createApplicationContext

protected final org.springframework.context.ApplicationContext createApplicationContext(java.lang.String pid)

getZooKeeper

public org.linkedin.zookeeper.client.IZKClient getZooKeeper()

setZooKeeper

public void setZooKeeper(org.linkedin.zookeeper.client.IZKClient zooKeeper)

getFabricService

public final FabricService getFabricService()

setFabricService

public final void setFabricService(FabricService fabricService)

getBundleContext

public final org.osgi.framework.BundleContext getBundleContext()

setBundleContext

public final void setBundleContext(org.osgi.framework.BundleContext bundleContext)


Copyright © 2012 FuseSource. All Rights Reserved.