|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mq.server.JMSServerInterceptorSupport
org.jboss.mq.server.JMSDestinationManager
public class JMSDestinationManager
This class implements the JMS provider
Field Summary | |
---|---|
Map |
closingDestinations
Destinations being closed SpyDestination -> JMSDestination |
Map |
destinations
Destinations SpyDestination -> JMSDestination |
static String |
JBOSS_VERSION
The version |
ThreadGroup |
threadGroup
Thread group |
org.jboss.util.threadpool.ThreadPool |
threadPool
Thread pool |
org.jboss.util.timeout.TimeoutFactory |
timeoutFactory
Timeout factory |
Fields inherited from class org.jboss.mq.server.JMSServerInterceptorSupport |
---|
log, nextInterceptor |
Constructor Summary | |
---|---|
JMSDestinationManager(BasicQueueParameters parameters)
Constructor for the JMSServer object |
Method Summary | |
---|---|
void |
acknowledge(ConnectionToken dc,
AcknowledgementRequest item)
#Description of the Method |
void |
acknowledge(ConnectionToken dc,
AcknowledgementRequest item,
Tx txId)
|
void |
addDestination(JMSDestination destination)
|
void |
addMessage(ConnectionToken dc,
SpyMessage val)
Add the message to the destination. |
void |
addMessage(ConnectionToken dc,
SpyMessage val,
Tx txId)
|
String |
authenticate(String id,
String password)
Check user for autentication. |
SpyMessage[] |
browse(ConnectionToken dc,
javax.jms.Destination dest,
String selector)
#Description of the Method |
void |
checkID(String ID)
Check id, must not be taken. |
protected void |
checkStopped()
|
String |
checkUser(String userName,
String password)
Check user for autentication. |
void |
closeDestination(SpyDestination dest)
Closed a destination that was opened previously |
void |
connectionClosing(ConnectionToken dc)
Close connection. |
void |
connectionFailure(ConnectionToken dc)
|
javax.jms.Queue |
createQueue(ConnectionToken dc,
String name)
Create a queue. |
javax.jms.Queue |
createQueue(String queueName)
|
javax.jms.Topic |
createTopic(ConnectionToken dc,
String name)
Create a topic. |
javax.jms.Topic |
createTopic(String topicName)
|
protected void |
deleteTemporaryDestination(ConnectionToken dc,
JMSDestination destination)
|
void |
deleteTemporaryDestination(ConnectionToken dc,
SpyDestination dest)
#Description of the Method |
void |
destroySubscription(ConnectionToken dc,
DurableSubscriptionID id)
Unsubscribe from the durable subscription. |
ClientConsumer |
getClientConsumer(ConnectionToken dc)
|
int |
getClientCount()
|
HashMap |
getClients()
Obtain a copy of the current clients |
SpyTopic |
getDurableTopic(DurableSubscriptionID sub)
Get the topic the durable subscription is on. |
String |
getID()
Gets the ID attribute of the JMSServer object |
JMSDestination |
getJMSDestination(SpyDestination dest)
|
MessageCache |
getMessageCache()
Gets the messageCache |
MessageCounter[] |
getMessageCounter()
Gets message counters of all configured destinations |
BasicQueueParameters |
getParameters()
|
PersistenceManager |
getPersistenceManager()
Gets the PersistenceManager attribute of the JMSServer object |
protected JMSDestination |
getPossiblyClosingJMSDestination(SpyDestination dest)
Gets the JMSDestination attribute of the JMSServer object which might be being closed |
StateManager |
getStateManager()
Gets the StateManager attribute of the JMSServer object |
Subscription |
getSubscription(ConnectionToken dc,
int subscriberId)
Get the subscription that match the id. |
javax.jms.TemporaryQueue |
getTemporaryQueue(ConnectionToken dc)
Get a temporary queue |
javax.jms.TemporaryTopic |
getTemporaryTopic(ConnectionToken dc)
Get a temporary topic. |
ThreadGroup |
getThreadGroup()
Get the thread group of the server. |
org.jboss.util.threadpool.ThreadPool |
getThreadPool()
|
org.jboss.util.timeout.TimeoutFactory |
getTimeoutFactory()
|
boolean |
isStopped()
Returns false if the JMS server is currently running and
handling requests, true otherwise. |
void |
ping(ConnectionToken dc,
long clientTime)
Ping the server. |
SpyMessage |
receive(ConnectionToken dc,
int subscriberId,
long wait)
#Description of the Method |
Xid[] |
recover(ConnectionToken dc,
int flags)
Recover |
void |
resetMessageCounter()
Resets message counters of all configured destinations |
void |
setEnabled(ConnectionToken dc,
boolean enabled)
Sets the Enabled attribute of the JMSServer object |
void |
setMessageCache(MessageCache messageCache)
Sets the messageCache |
void |
setPersistenceManager(PersistenceManager newPersistenceManager)
Sets the PersistenceManager attribute of the JMSServer object |
void |
setStateManager(StateManager newStateManager)
Sets the StateManager attribute of the JMSServer object |
void |
setThreadGroup(ThreadGroup threadGroup)
|
void |
setThreadPool(org.jboss.util.threadpool.ThreadPool threadPool)
|
void |
startServer()
Start the server |
void |
stopServer()
Stop the server |
void |
subscribe(ConnectionToken dc,
Subscription sub)
|
String |
toString()
|
void |
transact(ConnectionToken dc,
TransactionRequest t)
#Description of the Method |
void |
unsubscribe(ConnectionToken dc,
int subscriptionId)
Close the server side message consumer. |
Methods inherited from class org.jboss.mq.server.JMSServerInterceptorSupport |
---|
getNext, setNext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String JBOSS_VERSION
public Map destinations
public Map closingDestinations
public org.jboss.util.threadpool.ThreadPool threadPool
public ThreadGroup threadGroup
public org.jboss.util.timeout.TimeoutFactory timeoutFactory
Constructor Detail |
---|
public JMSDestinationManager(BasicQueueParameters parameters)
Method Detail |
---|
public void setEnabled(ConnectionToken dc, boolean enabled) throws javax.jms.JMSException
setEnabled
in interface JMSServerInterceptor
setEnabled
in class JMSServerInterceptorSupport
dc
- The new Enabled valueenabled
- The new Enabled value
javax.jms.JMSException
- Description of Exceptionpublic void setStateManager(StateManager newStateManager)
newStateManager
- The new StateManager valuepublic void setPersistenceManager(PersistenceManager newPersistenceManager)
newPersistenceManager
- The new PersistenceManager valuepublic boolean isStopped()
false
if the JMS server is currently running and
handling requests, true
otherwise.
false
if the JMS server is currently running and
handling requests, true
otherwise.protected void checkStopped() throws IllegalStateException
IllegalStateException
public int getClientCount()
public HashMap getClients()
public void setThreadPool(org.jboss.util.threadpool.ThreadPool threadPool)
public org.jboss.util.threadpool.ThreadPool getThreadPool()
public void setThreadGroup(ThreadGroup threadGroup)
public ThreadGroup getThreadGroup()
JMSServerInterceptor
getThreadGroup
in interface JMSServerInterceptor
getThreadGroup
in class JMSServerInterceptorSupport
public org.jboss.util.timeout.TimeoutFactory getTimeoutFactory()
public String getID()
getID
in interface JMSServerInterceptor
getID
in class JMSServerInterceptorSupport
public javax.jms.TemporaryTopic getTemporaryTopic(ConnectionToken dc) throws javax.jms.JMSException
JMSServerInterceptor
getTemporaryTopic
in interface JMSServerInterceptor
getTemporaryTopic
in class JMSServerInterceptorSupport
dc
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic javax.jms.TemporaryQueue getTemporaryQueue(ConnectionToken dc) throws javax.jms.JMSException
JMSServerInterceptor
getTemporaryQueue
in interface JMSServerInterceptor
getTemporaryQueue
in class JMSServerInterceptorSupport
dc
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic ClientConsumer getClientConsumer(ConnectionToken dc) throws javax.jms.JMSException
javax.jms.JMSException
public JMSDestination getJMSDestination(SpyDestination dest)
protected JMSDestination getPossiblyClosingJMSDestination(SpyDestination dest)
dest
- Description of Parameter
public StateManager getStateManager()
public PersistenceManager getPersistenceManager()
public void startServer()
public void stopServer()
public void checkID(String ID) throws javax.jms.JMSException
JMSServerInterceptor
checkID
in interface JMSServerInterceptor
checkID
in class JMSServerInterceptorSupport
ID
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic void addMessage(ConnectionToken dc, SpyMessage val) throws javax.jms.JMSException
JMSServerInterceptor
addMessage
in interface JMSServerInterceptor
addMessage
in class JMSServerInterceptorSupport
dc
- The feature to be added to the Message attributeval
- The feature to be added to the Message attribute
javax.jms.JMSException
- Description of Exceptionpublic void addMessage(ConnectionToken dc, SpyMessage val, Tx txId) throws javax.jms.JMSException
javax.jms.JMSException
public void transact(ConnectionToken dc, TransactionRequest t) throws javax.jms.JMSException
JMSServerInterceptor
transact
in interface JMSServerInterceptor
transact
in class JMSServerInterceptorSupport
dc
- Description of Parametert
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic Xid[] recover(ConnectionToken dc, int flags) throws Exception
Recoverable
recover
in interface Recoverable
recover
in class JMSServerInterceptorSupport
dc
- the connnection tokenflags
- the recovery flags
Exception
- for any errorpublic void acknowledge(ConnectionToken dc, AcknowledgementRequest item) throws javax.jms.JMSException
JMSServerInterceptor
acknowledge
in interface JMSServerInterceptor
acknowledge
in class JMSServerInterceptorSupport
dc
- Description of Parameteritem
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic void acknowledge(ConnectionToken dc, AcknowledgementRequest item, Tx txId) throws javax.jms.JMSException
javax.jms.JMSException
public void connectionClosing(ConnectionToken dc) throws javax.jms.JMSException
JMSServerInterceptor
connectionClosing
in interface JMSServerInterceptor
connectionClosing
in class JMSServerInterceptorSupport
dc
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic void connectionFailure(ConnectionToken dc) throws javax.jms.JMSException
javax.jms.JMSException
public void subscribe(ConnectionToken dc, Subscription sub) throws javax.jms.JMSException
subscribe
in interface JMSServerInterceptor
subscribe
in class JMSServerInterceptorSupport
dc
- org.jboss.mq.ConnectionTokensub
- org.jboss.mq.Subscription
javax.jms.JMSException
- The exception description.public void unsubscribe(ConnectionToken dc, int subscriptionId) throws javax.jms.JMSException
JMSServerInterceptor
unsubscribe
in interface JMSServerInterceptor
unsubscribe
in class JMSServerInterceptorSupport
dc
- Description of ParametersubscriptionId
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic void destroySubscription(ConnectionToken dc, DurableSubscriptionID id) throws javax.jms.JMSException
JMSServerInterceptor
destroySubscription
in interface JMSServerInterceptor
destroySubscription
in class JMSServerInterceptorSupport
id
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic SpyMessage[] browse(ConnectionToken dc, javax.jms.Destination dest, String selector) throws javax.jms.JMSException
JMSServerInterceptor
browse
in interface JMSServerInterceptor
browse
in class JMSServerInterceptorSupport
dc
- Description of Parameterdest
- Description of Parameterselector
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic SpyMessage receive(ConnectionToken dc, int subscriberId, long wait) throws javax.jms.JMSException
JMSServerInterceptor
receive
in interface JMSServerInterceptor
receive
in class JMSServerInterceptorSupport
dc
- Description of ParametersubscriberId
- Description of Parameterwait
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic javax.jms.Queue createQueue(ConnectionToken dc, String name) throws javax.jms.JMSException
JMSServerInterceptor
createQueue
in interface JMSServerInterceptor
createQueue
in class JMSServerInterceptorSupport
dc
- Description of Parametername
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic javax.jms.Topic createTopic(ConnectionToken dc, String name) throws javax.jms.JMSException
JMSServerInterceptor
createTopic
in interface JMSServerInterceptor
createTopic
in class JMSServerInterceptorSupport
dc
- Description of Parametername
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic javax.jms.Queue createQueue(String queueName) throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.Topic createTopic(String topicName) throws javax.jms.JMSException
javax.jms.JMSException
public void deleteTemporaryDestination(ConnectionToken dc, SpyDestination dest) throws javax.jms.JMSException
JMSServerInterceptor
deleteTemporaryDestination
in interface JMSServerInterceptor
deleteTemporaryDestination
in class JMSServerInterceptorSupport
dc
- Description of Parameterdest
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionprotected void deleteTemporaryDestination(ConnectionToken dc, JMSDestination destination) throws javax.jms.JMSException
javax.jms.JMSException
public String checkUser(String userName, String password) throws javax.jms.JMSException
JMSServerInterceptor
checkUser
in interface JMSServerInterceptor
checkUser
in class JMSServerInterceptorSupport
userName
- Description of Parameterpassword
- Description of Parameter
javax.jms.JMSException
- if user was not allowed to loginpublic String authenticate(String id, String password) throws javax.jms.JMSException
JMSServerInterceptor
authenticate
in interface JMSServerInterceptor
authenticate
in class JMSServerInterceptorSupport
id
- Description of Parameterpassword
- Description of Parameter
javax.jms.JMSException
- if user was not allowed to loginpublic void addDestination(JMSDestination destination) throws javax.jms.JMSException
javax.jms.JMSException
public void closeDestination(SpyDestination dest) throws javax.jms.JMSException
dest
- the destionation to close
javax.jms.JMSException
- Description of Exceptionpublic String toString()
toString
in class Object
public void ping(ConnectionToken dc, long clientTime) throws javax.jms.JMSException
JMSServerInterceptor
ping
in interface JMSServerInterceptor
ping
in class JMSServerInterceptorSupport
dc
- Description of ParameterclientTime
- Description of Parameter
javax.jms.JMSException
- Description of Exceptionpublic MessageCache getMessageCache()
public void setMessageCache(MessageCache messageCache)
messageCache
- The messageCache to setpublic SpyTopic getDurableTopic(DurableSubscriptionID sub) throws javax.jms.JMSException
JMSServerInterceptor
getDurableTopic
in interface JMSServerInterceptor
getDurableTopic
in class JMSServerInterceptorSupport
javax.jms.JMSException
public Subscription getSubscription(ConnectionToken dc, int subscriberId) throws javax.jms.JMSException
JMSServerInterceptor
getSubscription
in interface JMSServerInterceptor
getSubscription
in class JMSServerInterceptorSupport
javax.jms.JMSException
- if it can not find the subscription.public MessageCounter[] getMessageCounter()
public void resetMessageCounter()
public BasicQueueParameters getParameters()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |