| Package | com.kaazing.gateway.jms.client.stomp |
| Class | public class StompInitialContext |
| Property | Defined by | ||
|---|---|---|---|
| CONNECTION_TIMEOUT : String = "com.kaazing.gateway.jms.client.stomp.connectionTimeout" [static] Time to wait on initial connection before closing in milliseconds
| StompInitialContext | ||
| PROVIDER_URL : String = "java.naming.provider.url" [static] Gateway location for connections
| StompInitialContext | ||
| RECONNECT_ATTEMPTS_MAX : String = "com.kaazing.gateway.jms.client.stomp.reconnectAttemptsMax" [static] Maximum number of reconnect attempts (default to infinite)
| StompInitialContext | ||
| RECONNECT_DELAY : String = "com.kaazing.gateway.jms.client.stomp.reconnectDelay" [static] Time to wait between reconnect attempts in milliseconds
| StompInitialContext | ||
| SHUTDOWN_DELAY : String = "com.kaazing.gateway.jms.client.stomp.shutdownDelay" [static] Time to wait for server to close socket after sending DISCONNECT before closing in milliseconds
| StompInitialContext | ||
| Method | Defined by | ||
|---|---|---|---|
|
StompInitialContext(env:Dictionary)
Creates a new StompInitialContext
To create a new ConnectionFactory with a target Gateway URL, use the following:
| StompInitialContext | ||
|
lookup(name:String):Object
Retrieves the named object.
| StompInitialContext | ||
| CONNECTION_TIMEOUT | property |
public static var CONNECTION_TIMEOUT:String = "com.kaazing.gateway.jms.client.stomp.connectionTimeout"Time to wait on initial connection before closing in milliseconds
| PROVIDER_URL | property |
public static var PROVIDER_URL:String = "java.naming.provider.url"Gateway location for connections
| RECONNECT_ATTEMPTS_MAX | property |
public static var RECONNECT_ATTEMPTS_MAX:String = "com.kaazing.gateway.jms.client.stomp.reconnectAttemptsMax"Maximum number of reconnect attempts (default to infinite)
| RECONNECT_DELAY | property |
public static var RECONNECT_DELAY:String = "com.kaazing.gateway.jms.client.stomp.reconnectDelay"Time to wait between reconnect attempts in milliseconds
| SHUTDOWN_DELAY | property |
public static var SHUTDOWN_DELAY:String = "com.kaazing.gateway.jms.client.stomp.shutdownDelay"Time to wait for server to close socket after sending DISCONNECT before closing in milliseconds
| StompInitialContext | () | constructor |
public function StompInitialContext(env:Dictionary)Creates a new StompInitialContext
To create a new ConnectionFactory with a target Gateway URL, use the following:
var env:Dictionary = new Dictionary();
env[StompInitialContext.PROVIDER_URL] = "ws://localhost:8000/jms";
initialContext = new StompInitialContext(env);
var connectionFactory:ConnectionFactory =
initialContext.lookup("ConnectionFactory") as ConnectionFactory;
var connection:Connection = connectionFactory.createConnection(username, password);
...
env:Dictionary — the environment for initialization
|
| lookup | () | method |
public function lookup(name:String):Object
Retrieves the named object. Throws an Error if the name is not bound.
If name is "ConnectionFactory", returns a ConnectionFactory object that
connects to the provider url (Gateway url) defined in the env properties
passed to the StompInitialContext() constructor.
Returns a Destination representing a topic or queue in the JMS provider.
The following format is used for all topics and queues, regardless of the
server format.
/topic/destination (Topic)
/queue/destination (Queue)
Use the Session interface to create Temporary Topics and Queues.
name:String — The bound object to lookup
|
Object |