public class MComponentRegistry extends MRegistry
MComponent
.
The component registry is maintained by the SDK. The components are created
and destroyed by the MApp.start()
and MApp.stop()
methods. All components
are automatically included in the component registry.
If you create your own components that are not part of TIBCO Repository, you need to manage them yourself inside the application. This is not recommended.
Constructor and Description |
---|
MComponentRegistry()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addAmxConsumer(java.lang.String amxServiceName,
MAmxConsumer consumer) |
boolean |
addComponent(MComponent component)
Add an object to this
MComponentRegistry . |
void |
addTpVector(java.lang.String sName) |
void |
decrementJmsSubscriberCount() |
void |
decrementTotalMessageSent() |
void |
destroy()
internal use - do no document
|
MAmxConsumer |
getAmxConsumer(java.lang.String amxServiceName) |
MAmxSession |
getAmxSession(java.lang.String name)
Retrieve the specified AMX session.
|
java.lang.Object |
getApp() |
MComponent |
getComponent(java.lang.String name)
Retrieve the component with the specified name.
|
java.util.Enumeration |
getComponentKeys()
Enumerate over the list of keys to the objects, in effect the object
names.
|
java.util.Enumeration |
getComponents()
Enumerate over the list of objects.
|
MJmsSession |
getJmsSession(java.lang.String name)
Retrieve the specified JMS session.
|
int |
getJmsSubscriberCount() |
MPerformanceMonitor |
getPerfMon() |
MPublisher |
getPublisher(java.lang.String name)
Retrieve the specified publisher.
|
java.util.Enumeration |
getRpcServers() |
MRvSession |
getRvSession(java.lang.String name)
Retrieve the specified TIBCO Rendezvous session.
|
MRvSession |
getSession(java.lang.String name)
Deprecated.
as of TIBCO Adapter SDK 5.0.0.
|
MSink |
getSink(java.lang.String name)
Retrieve the named trace sink.
|
MSubscriber |
getSubscriber(java.lang.String name)
Retrieve the named subscriber.
|
MTimer |
getTimer(java.lang.String name)
Retrieve the named timer.
|
int |
getTotalMessagesReceived() |
int |
getTotalMessagesSent() |
java.util.Vector |
getTpVector() |
boolean |
hasComponent(MComponent component)
Determine whether the registry holds a component.
|
boolean |
hasComponent(java.lang.String name)
Determine whether the registry holds a component with
given name.
|
void |
incrementJmsSubscriberCount() |
void |
incrementTotalMessageSent() |
void |
incrementTotalMessagesReceived() |
void |
monitorPerformance() |
void |
removeAmxConsumer(java.lang.String amxServiceName) |
MComponent |
removeComponent(MComponent component)
Remove a component from this registry.
|
MComponent |
removeComponent(java.lang.String name)
Remove a component from this registry.
|
void |
setApp(java.lang.Object app) |
clear, elements, getTypedObject, keys, putObject, removeObject, removeObject
public boolean addComponent(MComponent component)
MComponentRegistry
.
If there is already a component with the same name in the registry,
this operation has no effect and the method returns false
.
As a rule, the SDK itself adds components to the component registry. This method is only required under unusual circumstances.
hasComponent(String)
public MComponent getComponent(java.lang.String name)
public java.util.Enumeration getComponents()
Enumeration.nextElement()
can be cast to MComponent
.public java.util.Enumeration getComponentKeys()
Enumeration.nextElement()
can be cast to String.public MRvSession getSession(java.lang.String name)
public MRvSession getRvSession(java.lang.String name)
name
- Name of TIBCO Rendezvous session to retrieve.public MJmsSession getJmsSession(java.lang.String name)
name
- Name of JMS session to retrieve.public MAmxSession getAmxSession(java.lang.String name)
name
- Name of AMX session to retrieve.public void addAmxConsumer(java.lang.String amxServiceName, MAmxConsumer consumer)
public void removeAmxConsumer(java.lang.String amxServiceName)
public MAmxConsumer getAmxConsumer(java.lang.String amxServiceName)
public MPublisher getPublisher(java.lang.String name)
name
- Name of publisher to retrieve.public MSubscriber getSubscriber(java.lang.String name)
name
- Name of subscriber to retrieve.public MTimer getTimer(java.lang.String name)
name
- Name of timer to retrieve.public MSink getSink(java.lang.String name)
name
- Name of sink to retrieve.public boolean hasComponent(MComponent component)
component
- The component to lookup in the registry.addComponent(MComponent)
public boolean hasComponent(java.lang.String name)
name
- Name of the component to lookup in the registry.addComponent(MComponent)
public MComponent removeComponent(MComponent component)
component
- The component to be removed from the registry.addComponent(MComponent)
,
hasComponent(String)
public MComponent removeComponent(java.lang.String name)
name
- Name of the component to be removed from the registry.addComponent(MComponent)
,
hasComponent(String)
public java.lang.Object getApp()
public java.util.Enumeration getRpcServers()
public void setApp(java.lang.Object app)
public void monitorPerformance()
public void addTpVector(java.lang.String sName)
public java.util.Vector getTpVector()
public MPerformanceMonitor getPerfMon()
public void incrementTotalMessageSent()
public void incrementTotalMessagesReceived()
public void decrementTotalMessageSent()
public int getTotalMessagesSent()
public int getTotalMessagesReceived()
public void incrementJmsSubscriberCount()
public int getJmsSubscriberCount()
public void decrementJmsSubscriberCount()