Developing Apama Applications > Developing Clients > The C++ and Java Client Software Development Kits > The library classes > Additional functionality
Additional functionality
The C++ and Java development kits vary slightly in the way they support construction and destruction of objects. While the C++ SDK provides a set of static library methods that must be called to create and delete objects of the main classes, the Java SDK either provides factory classes or else has no restrictions on directly constructing objects.
The following methods (parameters not specified here) are provided:
*com::apama::engine::engineInit() – C++
This method must be called exactly once when the client program is started. It initializes the library’s state. There is no such requirement in Java and therefore no equivalent.
*com::apama::engine::connectToEngine() – C++
connectToEngine() in com.apama.engine.EngieManagementFactory – Java
This method is called to establish a connection to a running correlator instance.
*com::apama::engine::createMonitorScript() – C++
This method creates and returns a MonitorScript object.
*com.apama.MonitorScript class – Java
In Java one can directly construct a MonitorScript object.
*com::apama::engine::deleteMonitorScript() – C++
This method frees and deletes a MonitorScript object. Note that the developer is responsible for calling this method and freeing the memory used by a MonitorScript object.
*com.apama.MonitorScript class – Java
In Java the MonitorScript object is garbage collected as normal when no longer referenced.
*com::apama::event::deleteEventSupplier() – C++
disconnect() in com.apama.event.EventSupplier –Java
This method frees and deletes the EventSupplier specified and breaks the connection between the consumer and the EventSupplier/correlator.
*com::apama::engine::deleteStatus() – C++
This method frees and deletes an EngineStatus object. Note that the developer is responsible for calling this method and freeing the memory used by an EngineStatus object.
*com.apama.engine.EngineStatus class – Java
In Java an object that implements EngineStatus is automatically garbage collected.
*com::apama::event::createEvent() – C++
This method creates and returns an Event object, which can then be injected into the correlator.
*com.apama.event.Event class – Java
In Java one can directly construct an Event object.
*com::apama::event::deleteEvent() – C++
This method frees and deletes an Event object. Note that the developer is responsible for calling this method and freeing the memory used by an Event object.
*com.apama.event.Event class – Java
In Java an Event object is garbage collected as normal.
*com::apama::engine::disconnectFromEngine() – C++
This method disconnects the client program from the correlator and cleans up data structures and memory resources.
There is no Java equivalent as it is not required.
*com::apama::engine::engineShutdown() – C++
This method cleans up and shuts down the client library and must be called exactly once, after the program has disconnected from the correlator.
There is no Java equivalent requirement.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.