|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.messagemgr.DestinationManager
The destination manager is responsible for creating and managing the
lifecycle of DestinationCache
objects. The destination manager
is also responsible for managing messages, that are received by the
message manager, which do not have any registered DestinationCache
Method Summary | |
void |
collectGarbage(boolean aggressive)
Perform any garbage collection on this resource. |
boolean |
createAdministeredDestination(JmsDestination dest)
Create an administered destination using the specified destination. |
void |
createDestination(JmsDestination destination)
Create a non-administered destination and cache it. |
DestinationCache |
createDestinationCache(java.sql.Connection connection,
JmsDestination dest)
Create a destination of the specified type. |
DestinationCache |
createDestinationCache(JmsDestination dest)
Create a destination of the specified type. |
static DestinationManager |
createInstance()
Create the singleton instance of the destination manager |
void |
deleteAdministeredDestination(JmsDestination dest)
Remove the corresponding administered destination from persistent store, from transient memory and from the jndi context. |
boolean |
destinationExists(JmsDestination destination)
Check if the specified destination exists. |
JmsDestination |
destinationFromString(java.lang.String name)
Return the JmsDestination corresponding to the specified destination name |
java.util.Iterator |
destinationNames()
Return a list of destination names currently supported by the destination manager. |
java.util.Iterator |
destinations()
Return a list of DestinationCache objects that are currently
active and in memory. |
void |
destroy()
Destroy this manager. |
void |
destroyDestinationCache(DestinationCache cache)
Delete the specfied destination |
void |
destroyDestinationCache(JmsDestination dest)
Delete the specfied destination |
void |
destroyDestinationCache(java.lang.String name)
Deprecated. use destroyDestination(JmsDestination) instead |
DestinationCache |
getDestinationCache(JmsDestination dest)
Return the destination cache associated with the dest object |
DestinationCache |
getDestinationCache(MessageImpl message)
Return the DestinationCache for this message. |
DestinationCache |
getDestinationCache(java.lang.String dest)
Return the destination object associated with destination |
boolean |
hasDestinationCache(JmsDestination dest)
Check if the specified destination exists. |
protected void |
init()
Initialises the destination manager. |
static DestinationManager |
instance()
Return the singleton destination manager |
boolean |
isAdministeredDestination(java.lang.String name)
Test whether the specified destination is an administered destination. |
boolean |
isMessageForAdministeredDestination(MessageImpl msg)
Test whether the specified message is for an administered destination. |
boolean |
messageAdded(JmsDestination destination,
MessageImpl message)
This method is called when the MessageMgr adds a message
for this destination to the cache |
void |
messageRemoved(JmsDestination destination,
MessageImpl message)
This method is called when the MessageMgr removes a
message from the cache. |
boolean |
persistentMessageAdded(java.sql.Connection connection,
JmsDestination destination,
MessageImpl message)
This event is called when the MessageMgr adds a persistent
message to the cache. |
void |
persistentMessageRemoved(java.sql.Connection connection,
JmsDestination destination,
MessageImpl message)
This event is called when the MessageMgr removes a persistent
message from the cache. |
void |
registerConfiguredAdministeredDestinations()
This method will create the administered destinations specified in the configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static DestinationManager createInstance() throws org.exolab.core.service.ServiceException
org.exolab.core.service.ServiceException
- if the service cannot be initialisedpublic static DestinationManager instance()
null
if it hasn't
been initialisedpublic DestinationCache createDestinationCache(JmsDestination dest)
dest
- - the destination to createpublic DestinationCache createDestinationCache(java.sql.Connection connection, JmsDestination dest)
connection
- - the connection to use.dest
- - the destination to createpublic void destroyDestinationCache(DestinationCache cache)
cahe
- - the destination to destroypublic void destroyDestinationCache(java.lang.String name)
name
- - destination namepublic void destroyDestinationCache(JmsDestination dest)
dest
- - the destination to destroypublic JmsDestination destinationFromString(java.lang.String name)
name
- - destination namepublic DestinationCache getDestinationCache(JmsDestination dest)
dest
- - the destinationpublic DestinationCache getDestinationCache(java.lang.String dest)
dest
- - the name of the destinationpublic DestinationCache getDestinationCache(MessageImpl message)
DestinationCache
for this message.message
- - the message to querypublic boolean hasDestinationCache(JmsDestination dest)
dest
- - destination to checkpublic void createDestination(JmsDestination destination)
destination
- - the destination to createpublic boolean createAdministeredDestination(JmsDestination dest) throws javax.jms.JMSException
dest
- - the destinationpublic void deleteAdministeredDestination(JmsDestination dest) throws javax.jms.JMSException
dest
- - the destination to removepublic java.util.Iterator destinationNames()
JmsDestination
objectspublic java.util.Iterator destinations()
DestinationCache
objects that are currently
active and in memory. This will return a list of all destination
types (temporary. transient, administered}.public void registerConfiguredAdministeredDestinations()
public boolean messageAdded(JmsDestination destination, MessageImpl message)
MessageManagerEventListener
MessageMgr
adds a message
for this destination to the cachemessageAdded
in interface MessageManagerEventListener
org.exolab.jms.messagemgr.MessageManagerEventListener
destination
- the message's destinationmessage
- the message added to cachetrue
if this message was acceptedpublic void messageRemoved(JmsDestination destination, MessageImpl message)
MessageManagerEventListener
MessageMgr
removes a
message from the cache.messageRemoved
in interface MessageManagerEventListener
org.exolab.jms.messagemgr.MessageManagerEventListener
destination
- the message's destinationmessage
- message removed from cachepublic boolean persistentMessageAdded(java.sql.Connection connection, JmsDestination destination, MessageImpl message) throws PersistenceException
MessageManagerEventListener
MessageMgr
adds a persistent
message to the cache.persistentMessageAdded
in interface MessageManagerEventListener
org.exolab.jms.messagemgr.MessageManagerEventListener
connection
- the database connectiondestination
- the message's destinationmessage
- message added to cachetrue
Throws:PersistenceException
- if there is a persistence related problempublic void persistentMessageRemoved(java.sql.Connection connection, JmsDestination destination, MessageImpl message) throws PersistenceException
MessageManagerEventListener
MessageMgr
removes a persistent
message from the cache.persistentMessageRemoved
in interface MessageManagerEventListener
org.exolab.jms.messagemgr.MessageManagerEventListener
connection
- the database connectionmessage
- message to remove from cachedestination
- the message's destinationPersistenceException
- - if there is a persistence related problempublic void collectGarbage(boolean aggressive)
GarbageCollectable
collectGarbage
in interface GarbageCollectable
org.exolab.jms.gc.GarbageCollectable
aggressive
- - true for aggressive garbage collectionpublic void destroy()
public boolean isAdministeredDestination(java.lang.String name)
name
- - the name of the destinationpublic boolean isMessageForAdministeredDestination(MessageImpl msg)
message
- - the message to checkpublic boolean destinationExists(JmsDestination destination)
destination
- - the destination to checkprotected void init() throws org.exolab.core.service.ServiceException
org.exolab.core.service.ServiceException
- if the service cannot be initialised
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |