1 46 package org.mr.api.simple; 47 48 import org.mr.MantaAgentConstants; 49 50 62 public class SimpleAPI { 63 64 68 public SimpleAPI() { 69 this("."); 70 } 71 72 78 public SimpleAPI(String mantaConf) { 79 System.setProperty(MantaAgentConstants.MANTA_CONFIG, mantaConf); 80 } 81 82 92 public Producer openProducer(String queueName) throws SimpleException { 93 return new Producer(queueName); 94 } 95 96 106 public Consumer openConsumer(String queueName) throws SimpleException { 107 return new Consumer(queueName); 108 } 109 110 120 public Publisher openPublisher(String topicName) throws SimpleException { 121 return new Publisher(topicName); 122 } 123 124 134 public Subscriber openSubscriber(String topicName) throws SimpleException { 135 return new Subscriber(topicName); 136 } 137 } | Popular Tags |