org.wso2.carbon.databridge.agent
Class AgentHolder

java.lang.Object
  extended by org.wso2.carbon.databridge.agent.AgentHolder

public class AgentHolder
extends Object

The holder for all Agents created and this is singleton class. The Agents will be loaded by reading a configuration file data-agent-conf.xml default.


Method Summary
 DataEndpointAgent getDataEndpointAgent(String type)
           
 DataEndpointAgent getDefaultDataEndpointAgent()
          Returns the default agent,and the first element in the data-agent-conf.xml is taken as default data publisher type.
static AgentHolder getInstance()
           
static void setConfigPath(String configPath)
          Set the data-agent-conf.xml path from which the Agents for all endpoint types will be loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AgentHolder getInstance()
                               throws DataEndpointAgentConfigurationException
Throws:
DataEndpointAgentConfigurationException

getDataEndpointAgent

public DataEndpointAgent getDataEndpointAgent(String type)
                                       throws DataEndpointAgentConfigurationException
Throws:
DataEndpointAgentConfigurationException

getDefaultDataEndpointAgent

public DataEndpointAgent getDefaultDataEndpointAgent()
                                              throws DataEndpointAgentConfigurationException
Returns the default agent,and the first element in the data-agent-conf.xml is taken as default data publisher type.

Returns:
DataEndpointAgent for the default endpoint name.
Throws:
DataEndpointAgentConfigurationException

setConfigPath

public static void setConfigPath(String configPath)
Set the data-agent-conf.xml path from which the Agents for all endpoint types will be loaded. This is a one time operation, and if you are changing form default config path, then it needs to be done as first step when the JVM started.

Parameters:
configPath - The path of the data-bridge-conf.xml


Copyright © 2015 WSO2. All rights reserved.