lookupContainer Method

Allows the Listener to create a Container object, the methods of which can be used to create Event objects and Meter objects. This method will create a Container object only when that object does not already exist. If the object already exists, the existing object is returned.

Syntax

Container lookupContainer(String containerName);

Parameters

containerName
[in] Required String, which provides the name of the Container object. The string may be passed as Unicode that contains any printable characters, excluding the newline character.

Example

Listener listener = new Listener("sampleApp", "4.0");
Container store = listener.lookupContainer("storeName");
Event creations = store.lookupEvent(PCHeventClass.RPC, "document creations", false);
Meter cacheSize = store.lookupMeter("cache size"); 
...

See Also