activemq::wireformat::WireFormatRegistry Class Reference

Registry of all WireFormat Factories that are available to the client at runtime. More...

#include <src/main/activemq/wireformat/WireFormatRegistry.h>

Public Member Functions

virtual ~WireFormatRegistry ()
WireFormatFactoryfindFactory (const std::string &name) const
 Gets a Registered WireFormatFactory from the Registry and returns it if there is not a registered format factory with the given name an exception is thrown.
void registerFactory (const std::string &name, WireFormatFactory *factory)
 Registers a new WireFormatFactory with this Registry.
void unregisterFactory (const std::string &name)
 Unregisters the Factory with the given name and deletes that instance of the Factory.
void unregisterAllFactories ()
 Removes all Factories and deletes the instances of the Factory objects.
std::vector< std::string > getWireFormatNames () const
 Retrieves a list of the names of all the Registered WireFormat's in this Registry.

Static Public Member Functions

static WireFormatRegistrygetInstance ()
 Gets the single instance of the WireFormatRegistry.

Friends

class activemq::library::ActiveMQCPP

Detailed Description

Registry of all WireFormat Factories that are available to the client at runtime.

New WireFormat's must have a factory registered here before a connection attempt is made.

Since:
3.0

Constructor & Destructor Documentation

virtual activemq::wireformat::WireFormatRegistry::~WireFormatRegistry (  )  [virtual]

Member Function Documentation

WireFormatFactory* activemq::wireformat::WireFormatRegistry::findFactory ( const std::string &  name  )  const

Gets a Registered WireFormatFactory from the Registry and returns it if there is not a registered format factory with the given name an exception is thrown.

Parameters:
name The name of the Factory to find in the Registry.
Returns:
the Factory registered under the given name.
Exceptions:
NoSuchElementException if no factory is registered with that name.
static WireFormatRegistry& activemq::wireformat::WireFormatRegistry::getInstance (  )  [static]

Gets the single instance of the WireFormatRegistry.

Returns:
reference to the single instance of this Registry
std::vector<std::string> activemq::wireformat::WireFormatRegistry::getWireFormatNames (  )  const

Retrieves a list of the names of all the Registered WireFormat's in this Registry.

Returns:
stl vector of strings with all the WireFormat names registered.
void activemq::wireformat::WireFormatRegistry::registerFactory ( const std::string &  name,
WireFormatFactory factory 
)

Registers a new WireFormatFactory with this Registry.

If a Factory with the given name is already registered it is overwritten with the new one. Once a factory is added to the Registry its lifetime is controlled by the Registry, it will be deleted once the Registry has been deleted.

Parameters:
name The name of the new Factory to register.
factory The new Factory to add to the Registry.
Exceptions:
IllegalArgumentException is name is the empty string.
NullPointerException if the Factory is Null.
void activemq::wireformat::WireFormatRegistry::unregisterAllFactories (  ) 

Removes all Factories and deletes the instances of the Factory objects.

void activemq::wireformat::WireFormatRegistry::unregisterFactory ( const std::string &  name  ) 

Unregisters the Factory with the given name and deletes that instance of the Factory.

Parameters:
name Name of the Factory to unregister and destroy

Friends And Related Function Documentation

friend class activemq::library::ActiveMQCPP [friend]

The documentation for this class was generated from the following file:

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1