public class MOMCommandsImpl extends Object implements MOMCommands
| Modifier and Type | Class and Description |
|---|---|
private class |
MOMCommandsImpl.QueueNotFoundException |
private class |
MOMCommandsImpl.SubscriptionNotFoundException |
private class |
MOMCommandsImpl.TopicNotFoundException |
private class |
MOMCommandsImpl.UserNotFoundException |
| Modifier and Type | Field and Description |
|---|---|
private static org.osgi.util.tracker.ServiceTracker |
adminTracker |
private static org.osgi.framework.BundleContext |
bundleContext |
private static org.osgi.util.tracker.ServiceTracker |
clientSubTracker |
static String[] |
COMMANDS
Commands list
|
private static org.osgi.util.tracker.ServiceTracker |
destinationTracker |
private static MOMCommandsImpl |
INSTANCE |
static String |
NAMESPACE |
private static org.osgi.util.tracker.ServiceTracker |
queueTracker |
private static int |
TIMEOUT |
private static org.osgi.util.tracker.ServiceTracker |
topicTracker |
private static org.osgi.util.tracker.ServiceTracker |
userTracker |
| Constructor and Description |
|---|
MOMCommandsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(String[] args)
Deletes all pending messages from a subscription or a queue.
|
void |
create(String[] args)
Creates a destination or a user
Usage: [joram:mom:]create |
private void |
createDestination(String[] args) |
private void |
createUser(String[] args)
Add a new user to the servers
|
void |
delete(String[] args)
Delete a destination or a user
Usage: [joram:mom:]delete (topic|queue|user) |
void |
deleteMsg(String[] args)
Delete a pending message from a queue or subscription
Usage: [joram:mom:]deleteMsg queue [joram:mom:]deleteMsg subscription |
private void |
deleteMsgQueue(String queueName,
String msgId) |
private void |
deleteMsgSub(String userName,
String subName,
String msgId) |
private org.objectweb.joram.mom.dest.AdminTopicMBean |
findAdminTopic() |
private org.objectweb.joram.mom.proxies.ClientSubscriptionMBean |
findClientSubscription(String userName,
String subName) |
private org.objectweb.joram.mom.dest.QueueMBean |
findQueue(String name) |
private org.objectweb.joram.mom.dest.TopicMBean |
findTopic(String name) |
private org.objectweb.joram.mom.proxies.UserAgentMBean |
findUser(String userName) |
static MOMCommandsImpl |
getInstance() |
private List<org.objectweb.joram.mom.messages.MessageView> |
getMessageRange(List<org.objectweb.joram.mom.messages.MessageView> msgs,
int start,
int end) |
private org.objectweb.joram.mom.messages.MessageView |
getQueueMessage(String queueName,
String msgId) |
private List<org.objectweb.joram.mom.messages.MessageView> |
getQueueMessages(String queueName) |
private org.objectweb.joram.mom.messages.MessageView |
getSubscriptionMessage(String userName,
String subName,
String msgId) |
private List<org.objectweb.joram.mom.messages.MessageView> |
getSubscriptionMessages(String userName,
String subscriptionName) |
static void |
help()
Prints all MOM commands
|
static void |
help(String command)
Prints the description of the given command
Usage: [joram:mom:]help |
void |
info(String[] args)
Show information about a destination
Usage: [joram:mom:]info (queue|topic) [joram:mom:]info subscription |
void |
infoMsg(String[] args) |
private void |
infoQueue(String name) |
private void |
infoSubscription(String userName,
String subName) |
private void |
infoTopic(String name) |
static void |
init(org.osgi.framework.BundleContext context) |
void |
list(String[] args)
Lists all queues, topics, both or users with useful informations
Usage: [joram:mom:]list Possible categories: destination, topic, queue, user, subscription NB: For the subscription category, you must provide the user name. |
private void |
listDestination() |
private void |
listQueue() |
private void |
listSubscription(String userName) |
private void |
listTopic() |
private void |
listUser() |
void |
lsMsg(String[] args)
Displays pending messages from a destination
Usage: [joram:mom:]lsMsg queue [joram:mom:]lsMsg subscription |
static void |
main(String[] args) |
void |
ping()
Checks whether Joram works
Usage: [joram:mom:]ping |
void |
queueLoad(String[] args)
Shows the pending message count
Usage: [joram:mom:]queueLoad |
void |
receiveMsg(String[] args)
Deprecated.
|
void |
sendMsg(String[] args)
Deprecated.
|
void |
setFreeRead(String[] args) |
void |
setFreeWrite(String[] args) |
void |
subscriptionLoad(String[] args)
Shows the pending message count of the subscription
Usage: [joram:mom:]subscriptionLoad |
private static MOMCommandsImpl INSTANCE
public static final String NAMESPACE
private static final int TIMEOUT
private static org.osgi.framework.BundleContext bundleContext
private static org.osgi.util.tracker.ServiceTracker destinationTracker
private static org.osgi.util.tracker.ServiceTracker queueTracker
private static org.osgi.util.tracker.ServiceTracker topicTracker
private static org.osgi.util.tracker.ServiceTracker userTracker
private static org.osgi.util.tracker.ServiceTracker adminTracker
private static org.osgi.util.tracker.ServiceTracker clientSubTracker
public static String[] COMMANDS
public static void init(org.osgi.framework.BundleContext context)
public static MOMCommandsImpl getInstance() throws Exception
Exceptionpublic static void help()
public static void help(String command)
command - Name of the command to describepublic void list(String[] args)
list in interface MOMCommandsargs - Category of item to list: destination, queue, topic, userprivate void listDestination()
private void listQueue()
private void listTopic()
private void listUser()
private void listSubscription(String userName)
public void create(String[] args)
create in interface MOMCommandsargs - parameters of the commandprivate void createDestination(String[] args)
private void createUser(String[] args)
args - parameters of the commandpublic void delete(String[] args)
delete in interface MOMCommandsargs - {category, name}public void setFreeRead(String[] args)
public void setFreeWrite(String[] args)
public void queueLoad(String[] args)
queueLoad in interface MOMCommandsargs - parameters of the commandprivate org.objectweb.joram.mom.dest.QueueMBean findQueue(String name) throws MOMCommandsImpl.QueueNotFoundException
private org.objectweb.joram.mom.dest.TopicMBean findTopic(String name) throws MOMCommandsImpl.TopicNotFoundException
private org.objectweb.joram.mom.dest.AdminTopicMBean findAdminTopic()
public void subscriptionLoad(String[] args)
subscriptionLoad in interface MOMCommandsargs - parameters of the commandprivate org.objectweb.joram.mom.proxies.UserAgentMBean findUser(String userName)
private org.objectweb.joram.mom.proxies.ClientSubscriptionMBean findClientSubscription(String userName, String subName) throws MOMCommandsImpl.UserNotFoundException, MOMCommandsImpl.SubscriptionNotFoundException
public void info(String[] args)
info in interface MOMCommandsargs - ???private void infoTopic(String name)
private void infoQueue(String name)
public void lsMsg(String[] args)
lsMsg in interface MOMCommandsargs - {queue name, message range}public void infoMsg(String[] args)
public void ping()
ping in interface MOMCommandspublic void deleteMsg(String[] args)
deleteMsg in interface MOMCommandspublic void clear(String[] args)
clear in interface MOMCommandspublic void sendMsg(String[] args)
MOMCommandssendMsg in interface MOMCommandspublic void receiveMsg(String[] args)
MOMCommandsreceiveMsg in interface MOMCommandsprivate List<org.objectweb.joram.mom.messages.MessageView> getQueueMessages(String queueName) throws MOMCommandsImpl.QueueNotFoundException
private org.objectweb.joram.mom.messages.MessageView getQueueMessage(String queueName, String msgId) throws MOMCommandsImpl.QueueNotFoundException
private List<org.objectweb.joram.mom.messages.MessageView> getSubscriptionMessages(String userName, String subscriptionName) throws MOMCommandsImpl.UserNotFoundException, MOMCommandsImpl.SubscriptionNotFoundException
private org.objectweb.joram.mom.messages.MessageView getSubscriptionMessage(String userName, String subName, String msgId) throws MOMCommandsImpl.UserNotFoundException, MOMCommandsImpl.SubscriptionNotFoundException
private List<org.objectweb.joram.mom.messages.MessageView> getMessageRange(List<org.objectweb.joram.mom.messages.MessageView> msgs, int start, int end)
public static void main(String[] args)
Copyright © 2019 ScalAgent D.T.. All Rights Reserved.