|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.management.domain.services.QpidService
public class QpidService
Qpid Broker facade.
Constructor Summary | |
---|---|
QpidService(UUID brokerId)
Builds a new service with the given connection data. |
Method Summary | |
---|---|
void |
close()
Closes communication with broker. |
void |
closed(org.apache.qpid.transport.Session ssn)
|
void |
connect()
Estabilishes a connection with the broker. |
void |
createSubscription(String queueName,
String destinationName,
org.apache.qpid.nclient.util.MessageListener listener)
Associate a message listener with a destination therefore creating a new subscription. |
void |
declareBinding(String queueName,
String exchangeName,
String routingKey)
Binds (on the broker) a queue with an exchange. |
void |
declareQueue(String queueName)
Declares a queue on the broker with the given name. |
void |
declareUnbinding(String queueName,
String exchangeName,
String routingKey)
Removes a previously declare binding between an exchange and a queue. |
void |
deleteQueue(String queueName)
Removes the queue with the given name from the broker. |
void |
exception(org.apache.qpid.transport.Session ssn,
org.apache.qpid.transport.SessionException exc)
|
void |
invoke(String packageName,
String className,
Binary schemaHash,
Binary objectId,
Object[] parameters,
QpidMethod method,
int sequenceNumber,
long bankId,
long brokerId)
Invokes an operation on a broker object instance. |
void |
message(org.apache.qpid.transport.Session ssn,
org.apache.qpid.transport.MessageTransfer xfr)
|
void |
opened(org.apache.qpid.transport.Session ssn)
|
void |
removeSubscription(String destinationName)
Removes a previously declared consumer from the broker. |
void |
requestSchema(String packageName,
String className,
Binary schemaHash)
Requests a schema for the given package.class.hash. |
void |
resumed(org.apache.qpid.transport.Session ssn)
|
void |
sendMessage(org.apache.qpid.api.Message message)
Sends a command message. |
void |
sync()
All the previously entered outstanding commands are asynchronous. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QpidService(UUID brokerId)
connectionData
- the connection data of the broker.Method Detail |
---|
public void connect() throws Exception
QpidException
- in case of connection failure.
Exception
public void opened(org.apache.qpid.transport.Session ssn)
opened
in interface org.apache.qpid.transport.SessionListener
public void resumed(org.apache.qpid.transport.Session ssn)
resumed
in interface org.apache.qpid.transport.SessionListener
public void message(org.apache.qpid.transport.Session ssn, org.apache.qpid.transport.MessageTransfer xfr)
message
in interface org.apache.qpid.transport.SessionListener
public void exception(org.apache.qpid.transport.Session ssn, org.apache.qpid.transport.SessionException exc)
exception
in interface org.apache.qpid.transport.SessionListener
public void closed(org.apache.qpid.transport.Session ssn)
closed
in interface org.apache.qpid.transport.SessionListener
public void sync()
public void close()
public void createSubscription(String queueName, String destinationName, org.apache.qpid.nclient.util.MessageListener listener)
queueName
- The name of the queue that the subscriber is receiving messages from.destinationName
- the name of the destination, or delivery tag, for the subscriber.listener
- the listener for this destination.Session#messageSubscribe(String, String, short, short, org.apache.qpid.nclient.MessagePartListener, java.util.Map, org.apache.qpid.transport.Option...)
public void removeSubscription(String destinationName)
destinationName
- the name of the destination, or delivery tag, for the subscriber.SessionInvoker.messageCancel(String, Option...)
public void declareQueue(String queueName)
queueName
- the name of the declared queue.SessionInvoker.queueDeclare(String, String, java.util.Map, Option...)
public void deleteQueue(String queueName)
queueName
- the name of the queue.SessionInvoker.queueDelete(String, Option...)
public void declareBinding(String queueName, String exchangeName, String routingKey)
queueName
- the name of the queue to bind.exchangeName
- the exchange name.routingKey
- the routing key used for the binding.SessionInvoker.exchangeBind(String, String, String, java.util.Map, Option...)
public void declareUnbinding(String queueName, String exchangeName, String routingKey)
queueName
- the name of the queue.exchangeName
- the name of the exchange.routingKey
- the routing key used for binding.public void requestSchema(String packageName, String className, Binary schemaHash) throws IOException
packageName
- the package name.className
- the class name.schemaHash
- the schema hash.
IOException
- when the schema request cannot be sent.public void invoke(String packageName, String className, Binary schemaHash, Binary objectId, Object[] parameters, QpidMethod method, int sequenceNumber, long bankId, long brokerId) throws MethodInvocationException, UnableToComplyException
packageName
- the package name.className
- the class name.schemaHash
- the schema hash of the corresponding class.objectId
- the object instance identifier.parameters
- the parameters for this invocation.method
- the method (definition) invoked.bankId
- the object bank identifier.brokerId
- the broker identifier.
MethodInvocationException
- when the invoked method returns an error code.
UnableToComplyException
- when it wasn't possibile to invoke the requested operation.public void sendMessage(org.apache.qpid.api.Message message) throws IOException
message
- the command message.
IOException
- when the message cannot be sent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |