public final class AmqpClient extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AmqpClient.ReadyState
Values are CONNECTING = 0, OPEN = 1 and CLOSED = 2;
|
Constructor and Description |
---|
AmqpClient(AmqpClientFactory factory)
Creates a new AmqpClient with default options.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(ConnectionListener listener)
Add a listener for ConnectionEvents
|
void |
connect(String url,
String virtualHost,
String username,
String password)
Connect to AMQP Broker via Kaazing Gateway
|
void |
disconnect()
Disconnects from Amqp Server.
|
AmqpClientFactory |
getAmqpClientFactory()
Returns the instance of
AmqpClientFactory that was used to
to create this instance. |
List<ConnectionListener> |
getConnectionListeners()
Returns the list of ConnectionListeners registered with this AmqpClient instance.
|
AmqpClient.ReadyState |
getReadyState()
Returns the current state of the AmqpClient
|
AmqpChannel |
openChannel()
Opens a channel on server.
|
void |
removeConnectionListener(ConnectionListener listener)
Remove a listener for ConnectionEvents
|
public AmqpClient(AmqpClientFactory factory)
public AmqpClient.ReadyState getReadyState()
public AmqpClientFactory getAmqpClientFactory()
AmqpClientFactory
that was used to
to create this instance.AmqpClientFactory
public void addConnectionListener(ConnectionListener listener)
listener
- public List<ConnectionListener> getConnectionListeners()
public void removeConnectionListener(ConnectionListener listener)
listener
- public void connect(String url, String virtualHost, String username, String password)
url
- Location of AMQP Broker or ServervirtualHost
- Name of the virtual hostusername
- Username to connect to the AMQP Serverpassword
- Password to connect to the AMQP Serverpublic void disconnect()
public AmqpChannel openChannel()
Copyright © 2014. All Rights Reserved.