diff --git a/java/KaazingAMQPClientLibrariesFacade.md b/java/KaazingAMQPClientLibrariesFacade.md new file mode 100644 index 0000000..ecc807a --- /dev/null +++ b/java/KaazingAMQPClientLibrariesFacade.md @@ -0,0 +1,154 @@ +# Kaazing JavaScript AMQP Client Libraries Facade +Kaazing AMQP Client Libraries Facade: +• Implements basic publish-subscribe functionality for AMQP protocol to help developers in getting started with their AMQP WebSocket projects +• Provide developers with the reference implementations for using Kaazing AMQP JavaScript client libraries +For more information see: +- [How to Build JavaScript Clients Using Kaazing WebSocket Gateway][2] +- [Use the Kaazing WebSocket Gateway JavaScript AMQP Client Library][3] + +## Organization of the library +Library consists of amqpClientFunction that creates AmqpClient object. AmqpClient objects provides the following functionality: +- **connect** function - connects client to Kaazing WebSocket AMQP gateway and on success returns via callback a _connection_ object that will be used to create subscriptions. +- ** subscribe ** method of a _connecion_ object that creates publishing endpoint and subscribes to a subscription endpoint. Method returns _subscription_ object that is used for sending messages. +- **sendMessage** method of a _subscription_ object - sends the message to a publishing endpoint +- **close** function of a _subscription_ object - closes both publishing and subscription. +- **disconnect** method - closes all subscriptions and disconnects client from Kaazing WebSocket AMQP gateway + + +### **connect** function +Connect function implements the following sequence: + +1. Create WebSocket and AMQP client factories + + ```javascript + var amqpClientFactory = new AmqpClientFactory(); + var webSocketFactory; + if ($gatewayModule && typeof($gatewayModule.WebSocketFactory) === "function") { + webSocketFactory = createWebSocketFactory(); + amqpClientFactory.setWebSocketFactory(webSocketFactory); + } + ``` + +2. Create AMQP client + + ```javascript + amqpClient = amqpClientFactory.createAmqpClient(); + ``` + +3. Connect to Gateway using amqpClient connect function. Connect function uses has the following parameters: + - Connection options. In most common cases it contains of URL, credentials and virtual host (set to ‘/‘) hat specifies the namespace for entities (exchanges and queues) referred to by the protocol. Note that this is not virtual hosting in the HTTP sense. + - Callback function that will be called once connection is established. + + ```javascript + var credentials = {username: username, password: password}; + var options = { + url: url, + virtualHost: "/", + credentials: credentials + }; + amqpClient.connect(options, function(){ + var connection=createConnectionObject(amqpClient,connectionInfo.username); + connectedFunctionHandle(connection); + }); + ``` + +### **subscribe** method of connection object +1. Creates subscription object +2. Initializes subscription object + - Opens publishing and consumption (subscription) channels using amqpClient openChannel function that will call on success the callback function that is passed as a parameter: + + ```javascript + var openHandler=function(){ + publishChannel = amqpClient.openChannel(this.publishChannelOpenHandler); + consumeChannel = amqpClient.openChannel(this.consumeChannelOpenHandler); + } + ``` + + Once the channels are created method returns the _subscription_ object via a callback. + During the creation of the channels: + - Publishing channel open handler declares AMQP Exchange of a _fanout_ type thus creating publishing endpoint. + + ```javascript + publishChannelOpenHandler:function(that){ + that.publishChannel.declareExchange({exchange: that.topicPub, type: "fanout"}); + } + ``` + - Consumption (or subscription) channel open handler: + 1. Adds an event listener for “message” event providing the ability to receive messages. + 2. Declares subscription queue for the client. Library randomly generates the name for every client. + 3. Binds the queue to a subscription exchange with “broadcastkey” routing key. + + **Note** For fanout exchanges routing key is not used. For more information about exchanges and routing keys see: [https://www.rabbitmq.com/tutorials/amqp-concepts.html][1] + + 4. Starts basic consumer. Basic consumer is started with noAck=true parameter so the client does not need to implement explicit acknowledgement. Another parameter - noLocal - controls whether the client wants to receive its own messages. + + ```javascript + consumeChannelOpenHandler:function(that{ + consumeChannel.addEventListener("message", function(message) { + var body = null; + // Check how the payload was packaged since older browsers like IE7 don't + // support ArrayBuffer. In those cases, a Kaazing ByteBuffer was used instead. + if (typeof(ArrayBuffer) === "undefined") { + body = message.getBodyAsByteBuffer().getString(Charset.UTF8); + } + else { + body = arrayBufferToString(message.getBodyAsArrayBuffer()) + } + that.messageReceivedFunc(body);; + }); + that.consumeChannel.declareQueue({queue: that.queueName}) + .bindQueue({queue: that.queueName, exchange: that.topicSub, routingKey: routingKey }) + .consumeBasic({queue: that.queueName, consumerTag: that.clientId, noAck: true, noLocal:that.noLocal }) + } + ``` + +### **sendMessage** function of a subscription object +Function sets AMQP properties and sends the message to a publishing exchange using specified routing key. +**Note:** As mentioned earlier, library creates a fanout type of exchange that does not use routing keys; thus library sets the value of the routing key to 'broadcast'. + +```javascript +sendMessage:function(msg){ + if (typeof msg ==="object"){ + msg.clientId=this.clientId; + msg=JSON.stringify(msg); + } + else{ + handleException("Message "+msg+" should be an object!"); + } + + var body = null; + if (typeof(ArrayBuffer) === "undefined") { + body = new ByteBuffer(); + body.putString(msg, Charset.UTF8); + body.flip(); + } + else { + body = stringToArrayBuffer(msg); + } + var props = new AmqpProperties(); + props.setContentType("text/plain"); + props.setContentEncoding("UTF-8"); + props.setDeliveryMode("1"); + props.setMessageId((this.messageIdCounter++).toString()); + props.setPriority("6"); + props.setTimestamp(new Date()); + props.setUserId(this.user); + logInformation("sent","Sending message to "+this.topicPub+": "+ msg, "sent"); + this.publishChannel.publishBasic({body: body, properties: props, exchange: this.topicPub, routingKey: routingKey}); + } +``` + +### **close** function of a subscription object +Due to AMQP nature, nothing has to be performed. + +### **disconnect** function +Disconnects the client from Kaazing WebSocket AMQP Gateway +```javascript +amqpClient.disconnect(); +``` + + + +[1]: https://www.rabbitmq.com/tutorials/amqp-concepts.html +[2]: http://developer.kaazing.com/documentation/amqp/4.0/dev-js/o_dev_js.html#keglibs +[3]: http://developer.kaazing.com/documentation/amqp/4.0/dev-js/p_dev_js_client.html diff --git a/java/KaazingJMSClientLibrariesFacade.md b/java/KaazingJMSClientLibrariesFacade.md new file mode 100644 index 0000000..3f805fd --- /dev/null +++ b/java/KaazingJMSClientLibrariesFacade.md @@ -0,0 +1,137 @@ +# Kaazing Javas JMS Client Libraries Facade +Kaazing Javat JMS Client Libraries Facade: +* Implements basic publish-subscribe functionality for JMS to help developers in getting started with their JMS WebSocket projects +* Provide developers with the reference implementations for using Kaazing AMQP Java client libraries + +For more information see: +- [Build Java JMS Clients Using Kaazing WebSocket Gateway - JMS Edition](http://developer.kaazing.com/documentation/jms/4.0/dev-java/o_dev_java.html) +- [Use the Kaazing WebSocket Gateway Java JMS Client API](http://developer.kaazing.com/documentation/jms/4.0/dev-java/p_dev_java_client.html) + +## Organization of the library +UniversalClientFactory's create +Library contains JMSUniversalClient class (implementing UniversalClient interface) that is created by UniversalClientFactory's _createUniversalClient_ method. JMSClient objects provides the following functionality: +- **constructor** connects client to Kaazing WebSocket JMS gateway +- **subscribe** function - subscribes to publishing and subscription endpoints and returns an instance of ClientSubscription object. +- **close** function - close all subscriptions and connections + +### **constructor** +Constructor implements the following sequence: + +1. Create JMS connection factory + +```javascript + var jmsConnectionFactory = new JmsConnectionFactory(url); +``` + +2. Create connection. createConnection function of JmsConnectionFactory takes three parameters: login, password and a callback function that will be called upon completion. Function returns the future that is checked in a callback function for exceptions. + +```javascript + var connectionFuture = jmsConnectionFactory.createConnection(username, password, function () { + if (!connectionFuture.exception) { + try { + connection = connectionFuture.getValue(); + connection.setExceptionListener(handleException); + + session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); + + connection.start(function () { + var connectionObject=createConnectionObject(session, JMSClient); + connectedFunctionHandle(connectionObject); + }); + } + catch (e) { + handleException(e); + } + } + else { + handleException(connectionFuture.exception); + } + }) +``` + +3. Once connection is created, callback function does the following: + 1. Obtains the connection from the connectionFuture that was returned by createConection. + 2. Sets exception listener to handle exceptions. + 3. Creates session using createSession method. Session is created with auto-acknowledgement. + 4. Starts the connection using start function passing to it a callback function. + +4. Once connection is started, connection object is returned for the subscription to be created using __subscribe__ method. + +### **subscribe** method of connection object +Method executed the following actions: + +- Creates publishing topic and producer to send messages + + ```javascript + var pubDest = session.createTopic(topicPub); + var producer = session.createProducer(dest); + ``` +- Creates subscription topic and consumer. + _In order to prevent client from receiving its own messages consumer may be created with the query that will filter out the messages with the 'appId' string property set to this client application ID - a randomly generated GUID._ + Once consumer is created, setMessageListener function is used to specify the function to be called when new message is received. + + ```javascript + var subDest = session.createTopic(topicSub); + if (noLocalFlag) + consumer = session.createConsumer(dest, "appId<>'" + appId + "'"); + else + consumer = session.createConsumer(dest); + consumer.setMessageListener(function (message) { + ... obtain the message body ... + + rcvFunction(body); + }); + ``` + +- Creates subscription object, adds it to the array of opened subscriptions and returns it via callback. + +### **sendMessage** function of a subscription object +Function creates text message and sends it. In order to prevent client from receiving its own messages 'appId' string property may be set to this client application ID - a randomly generated GUID. + +```javascript + sendMessage:function(msg){ + var textMsg = session.createTextMessage(msg); + if (noLocalFlag) + textMsg.setStringProperty("appId", appId); + try { + var future = producer.send(textMsg, function () { + if (future.exception) { + handleException(future.exception); + }; + }); + } catch (e) { + handleException(e); + } + } +``` + +### **close** function of a subscription object +Function closes producer and consumer that were created during the subscription call. + +```javascript + this.producer.close(function(){ + this.consumer.close(function(){ + }); + }) +``` + +### **disconnect** function +Closes all subscriptions (causing closing of their producer and consumer), session and connection in a chain of callbacks. + +```javascript + JMSClient.disconnect=function(){ + for(var i=0;i + com.kaazing.client + universal-client + 1.0+ + +``` + +### Obtaining and Configuring Kaazing Gateway +The Kaazing Universal WebSocket clients depend on the Kaazing WebSocket Gateway (KWG) being installed on one or more servers. KWG supports two protocols, AMQP and JMS. Read [Obtaining and configuring Kaazing Gateways and related Servers](https://github.com/kaazing/universal-client/blob/develop/ObtainingGateways.md) for more information. + +### Using the Library +- Create an instance of the Universal Client Library. + ```java + try (UniversalClient universalClient = UniversalClientFactory.createUniversalClient(UniversalClientProtocol.amqp, // Protocol + new URI("ws://localhost:8001/amqp"), // Kaazing Gateway URL + "guest", // Login to use to connect to Kaazing Gateway + "guest", // Password to use to connect to Kaazing Gateway + new ErrorsListener() { // Error listener callback - simply printerrors + @Override + public void onException(ClientException exception) { + System.err.println("Exception occurred! " + exception.getMessage()); + } + });) { + + ... + + }; + ``` + +- Establish a connection + ```java + try (UniversalClient universalClient = UniversalClientFactory.createUniversalClient(UniversalClientProtocol.amqp, // Protocol + new URI("ws://localhost:8001/amqp"), // Kaazing Gateway URL + "guest", // Login to use to connect to Kaazing Gateway + "guest", // Password to use to connect to Kaazing Gateway + new ErrorsListener() { // Error listener callback - simply printerrors + @Override + public void onException(ClientException exception) { + System.err.println("Exception occurred! " + exception.getMessage()); + } + });) { + + ClientSubscription subscription = universalClient.subscribe("test", // publishing point + "test", // subscription point + new MessagesListener() { // Message listener - simply print messages + @Override + public void onMessage(Serializable message) { + System.out.println("Received message: " + message.toString()); + } + + }; + ``` +- Send message + ```java + try (UniversalClient universalClient = UniversalClientFactory.createUniversalClient(UniversalClientProtocol.amqp, // Protocol + new URI("ws://localhost:8001/amqp"), // Kaazing Gateway URL + "guest", // Login to use to connect to Kaazing Gateway + "guest", // Password to use to connect to Kaazing Gateway + new ErrorsListener() { // Error listener callback - simply printerrors + @Override + public void onException(ClientException exception) { + System.err.println("Exception occurred! " + exception.getMessage()); + } + });) { + + ClientSubscription subscription = universalClient.subscribe("test", // publishing point + "test", // subscription point + new MessagesListener() { // Message listener - simply print messages + @Override + public void onMessage(Serializable message) { + System.out.println("Received message: " + message.toString()); + } + + // Send as a text + subscription.sendMessage(text); + // Send as an object + subscription.sendMessage(new SomeObjectMessage()); + + + }; + ``` + +## Organization of Kaazing JavaScript Universal Client + +![][image-1] + +As shown on the diagram above, Kaazing Universal Client works as following: +- Instantiate required Client Facade Library based on specified protocol that will interact with necessary Kaazing Java Client Libraries +- Pass the data to and from the Kaazing Java Client libraries via instantiated Client Facade Library + +For more information about Client Facade libraries see +[AMQP Client Libraries Facade][2] and [JMS Client Libraries Facade][3]. + + +## Documentation + +### AMQP +- [How to Build Java Clients Using Kaazing WebSocket Gateway](http://developer.kaazing.com/documentation/amqp/4.0/dev-java/o_dev_java.html) +- [Use the Kaazing WebSocket Gateway Java AMQP Client Library](http://developer.kaazing.com/documentation/amqp/4.0/dev-java/p_dev_java_client.html) + +### JMS +- [Build Java JMS Clients Using Kaazing WebSocket Gateway - JMS Edition](http://developer.kaazing.com/documentation/jms/4.0/dev-java/o_dev_java.html) +- [Use the Kaazing WebSocket Gateway Java JMS Client API](http://developer.kaazing.com/documentation/jms/4.0/dev-java/p_dev_java_client.html) + + +[2]: JavaClient.md "Java library" +[3]: KaazingAMQPClientLibrariesFacade.md +[4]: KaazingJMSClientLibrariesFacade.md +[image-1]: images/JavaUniversalClient.png "Java Universal Client" + + diff --git a/java/doc/allclasses-frame.html b/java/doc/allclasses-frame.html new file mode 100644 index 0000000..099267b --- /dev/null +++ b/java/doc/allclasses-frame.html @@ -0,0 +1,35 @@ + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/java/doc/allclasses-noframe.html b/java/doc/allclasses-noframe.html new file mode 100644 index 0000000..3989f8a --- /dev/null +++ b/java/doc/allclasses-noframe.html @@ -0,0 +1,35 @@ + + + + + +All Classes + + + + + +

All Classes

+
+ +
+ + diff --git a/java/doc/com/kaazing/client/universal/AmqpClientSubscription.html b/java/doc/com/kaazing/client/universal/AmqpClientSubscription.html new file mode 100644 index 0000000..2c041bd --- /dev/null +++ b/java/doc/com/kaazing/client/universal/AmqpClientSubscription.html @@ -0,0 +1,335 @@ + + + + + +AmqpClientSubscription + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class AmqpClientSubscription

+
+
+ +
+
    +
  • +
    +
    +
    public class AmqpClientSubscription
    +extends ClientSubscription
    +
    Contains information specific to AMQP subscriptions
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      AmqpClientSubscription(java.lang.String subscriptionIdentifier, + java.lang.String appId, + java.lang.String userId, + java.lang.String pubChannelName, + java.lang.String queueName, + com.kaazing.net.ws.amqp.AmqpChannel pubChannel, + com.kaazing.net.ws.amqp.AmqpChannel subChannel) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voiddisconnect() +
      Closes both publishing and subscription endpoints
      +
      voidsendMessage(java.io.Serializable message) +
      Sends the message over established subscription to the publishing point
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AmqpClientSubscription

        +
        public AmqpClientSubscription(java.lang.String subscriptionIdentifier,
        +                              java.lang.String appId,
        +                              java.lang.String userId,
        +                              java.lang.String pubChannelName,
        +                              java.lang.String queueName,
        +                              com.kaazing.net.ws.amqp.AmqpChannel pubChannel,
        +                              com.kaazing.net.ws.amqp.AmqpChannel subChannel)
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/AmqpMessageEnvelope.html b/java/doc/com/kaazing/client/universal/AmqpMessageEnvelope.html new file mode 100644 index 0000000..4ac224f --- /dev/null +++ b/java/doc/com/kaazing/client/universal/AmqpMessageEnvelope.html @@ -0,0 +1,313 @@ + + + + + +AmqpMessageEnvelope + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class AmqpMessageEnvelope

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    +
    public class AmqpMessageEnvelope
    +extends java.lang.Object
    +implements java.io.Serializable
    +
    Adds the sender ID to the message so it can be used for noLocal filtering when it is not supported by the server
    +
    +
    Author:
    +
    romans
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      AmqpMessageEnvelope(java.lang.String clientId, + java.io.Serializable data) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.StringgetClientId() 
      java.io.SerializablegetData() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AmqpMessageEnvelope

        +
        public AmqpMessageEnvelope(java.lang.String clientId,
        +                           java.io.Serializable data)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getClientId

        +
        public java.lang.String getClientId()
        +
      • +
      + + + +
        +
      • +

        getData

        +
        public java.io.Serializable getData()
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/AmqpUniversalClient.html b/java/doc/com/kaazing/client/universal/AmqpUniversalClient.html new file mode 100644 index 0000000..1bcb92b --- /dev/null +++ b/java/doc/com/kaazing/client/universal/AmqpUniversalClient.html @@ -0,0 +1,334 @@ + + + + + +AmqpUniversalClient + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class AmqpUniversalClient

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    UniversalClient, java.lang.AutoCloseable
    +
    +
    +
    +
    public class AmqpUniversalClient
    +extends java.lang.Object
    +implements UniversalClient
    +
    AMQP specific implmentation of Universal client
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      AmqpUniversalClient(java.net.URI url, + java.lang.String login, + java.lang.String password, + ErrorsListener errorsListener) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voidclose() 
      ClientSubscriptionsubscribe(java.lang.String pubTopicName, + java.lang.String subTopicName, + MessagesListener messageListener, + boolean noLocal) +
      Connects client to pub/sub endpoints
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        close

        +
        public void close()
        +           throws java.lang.Exception
        +
        +
        Specified by:
        +
        close in interface java.lang.AutoCloseable
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        subscribe

        +
        public ClientSubscription subscribe(java.lang.String pubTopicName,
        +                                    java.lang.String subTopicName,
        +                                    MessagesListener messageListener,
        +                                    boolean noLocal)
        +                             throws ClientException
        +
        Description copied from interface: UniversalClient
        +
        Connects client to pub/sub endpoints
        +
        +
        Specified by:
        +
        subscribe in interface UniversalClient
        +
        Parameters:
        +
        pubTopicName - name of publishing topic
        +
        subTopicName - name of subscription topic
        +
        messageListener - callback to receive messages
        +
        noLocal - if true client will not receive its own messages (applicable only when pub and sub points are the same)
        +
        Returns:
        +
        subscription information
        +
        Throws:
        +
        ClientException - indicates that error occurred
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/AmqpUniversalClientTest.TestObject.html b/java/doc/com/kaazing/client/universal/AmqpUniversalClientTest.TestObject.html new file mode 100644 index 0000000..046d817 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/AmqpUniversalClientTest.TestObject.html @@ -0,0 +1,288 @@ + + + + + +AmqpUniversalClientTest.TestObject + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class AmqpUniversalClientTest.TestObject

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Enclosing class:
    +
    AmqpUniversalClientTest
    +
    +
    +
    +
    public static class AmqpUniversalClientTest.TestObject
    +extends java.lang.Object
    +implements java.io.Serializable
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      TestObject(int a, + java.lang.String b) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TestObject

        +
        public TestObject(int a,
        +                  java.lang.String b)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/AmqpUniversalClientTest.html b/java/doc/com/kaazing/client/universal/AmqpUniversalClientTest.html new file mode 100644 index 0000000..dc1b5c2 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/AmqpUniversalClientTest.html @@ -0,0 +1,377 @@ + + + + + +AmqpUniversalClientTest + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class AmqpUniversalClientTest

+
+
+ +
+
    +
  • +
    +
    +
    public class AmqpUniversalClientTest
    +extends java.lang.Object
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        AmqpUniversalClientTest

        +
        public AmqpUniversalClientTest()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setUp

        +
        public void setUp()
        +           throws ClientException,
        +                  java.net.URISyntaxException
        +
        +
        Throws:
        +
        ClientException
        +
        java.net.URISyntaxException
        +
        +
      • +
      + + + +
        +
      • +

        testString

        +
        public void testString()
        +                throws ClientException,
        +                       java.lang.InterruptedException
        +
        +
        Throws:
        +
        ClientException
        +
        java.lang.InterruptedException
        +
        +
      • +
      + + + +
        +
      • +

        testObject

        +
        public void testObject()
        +                throws ClientException,
        +                       java.lang.InterruptedException
        +
        +
        Throws:
        +
        ClientException
        +
        java.lang.InterruptedException
        +
        +
      • +
      + + + +
        +
      • +

        testNoLocal

        +
        public void testNoLocal()
        +                 throws ClientException,
        +                        java.lang.InterruptedException
        +
        +
        Throws:
        +
        ClientException
        +
        java.lang.InterruptedException
        +
        +
      • +
      + + + +
        +
      • +

        shutDown

        +
        public void shutDown()
        +              throws java.lang.Exception
        +
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/ClientException.html b/java/doc/com/kaazing/client/universal/ClientException.html new file mode 100644 index 0000000..a4c6bdf --- /dev/null +++ b/java/doc/com/kaazing/client/universal/ClientException.html @@ -0,0 +1,289 @@ + + + + + +ClientException + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class ClientException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    +
    public class ClientException
    +extends java.lang.Exception
    +
    Contains the exception reported by Universal Client
    +
    +
    Author:
    +
    romans
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      ClientException(java.lang.String text) 
      ClientException(java.lang.String text, + java.lang.Throwable t) 
      ClientException(java.lang.Throwable t) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ClientException

        +
        public ClientException(java.lang.String text,
        +                       java.lang.Throwable t)
        +
      • +
      + + + +
        +
      • +

        ClientException

        +
        public ClientException(java.lang.String text)
        +
      • +
      + + + +
        +
      • +

        ClientException

        +
        public ClientException(java.lang.Throwable t)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/ClientSubscription.html b/java/doc/com/kaazing/client/universal/ClientSubscription.html new file mode 100644 index 0000000..a774507 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/ClientSubscription.html @@ -0,0 +1,329 @@ + + + + + +ClientSubscription + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class ClientSubscription

+
+
+ +
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    AmqpClientSubscription, JMSClientSubscription
    +
    +
    +
    +
    public abstract class ClientSubscription
    +extends java.lang.Object
    +
    Contains information about subscription
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      ClientSubscription(java.lang.String subscriptionIdentifier) +
      Construct the subscription object.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and TypeMethod and Description
      abstract voiddisconnect() +
      Closes both publishing and subscription endpoints
      +
      java.lang.StringgetSubscriptionIdentifier() 
      abstract voidsendMessage(java.io.Serializable message) +
      Sends the message over established subscription to the publishing point
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ClientSubscription

        +
        public ClientSubscription(java.lang.String subscriptionIdentifier)
        +
        Construct the subscription object. The constructor should be overwritten by the implementation classes.
        +
        +
        Parameters:
        +
        subscriptionIdentifier - Identification of the subscription that is automatically generated when subscription is created.
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        sendMessage

        +
        public abstract void sendMessage(java.io.Serializable message)
        +                          throws ClientException
        +
        Sends the message over established subscription to the publishing point
        +
        +
        Parameters:
        +
        message - message to send
        +
        Throws:
        +
        ClientException - indicates that error occurred
        +
        +
      • +
      + + + +
        +
      • +

        disconnect

        +
        public abstract void disconnect()
        +                         throws ClientException
        +
        Closes both publishing and subscription endpoints
        +
        +
        Throws:
        +
        ClientException - indicates that error occurred
        +
        +
      • +
      + + + +
        +
      • +

        getSubscriptionIdentifier

        +
        public java.lang.String getSubscriptionIdentifier()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/ErrorsListener.html b/java/doc/com/kaazing/client/universal/ErrorsListener.html new file mode 100644 index 0000000..4c4d20c --- /dev/null +++ b/java/doc/com/kaazing/client/universal/ErrorsListener.html @@ -0,0 +1,231 @@ + + + + + +ErrorsListener + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Interface ErrorsListener

+
+
+
+
    +
  • +
    +
    +
    public interface ErrorsListener
    +
    Provides implementation for calback to handle the errors
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onException

        +
        void onException(ClientException exception)
        +
        Called by the Universal Client when exception occurs
        +
        +
        Parameters:
        +
        exception - exception reported by the client
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/JMSClientSubscription.html b/java/doc/com/kaazing/client/universal/JMSClientSubscription.html new file mode 100644 index 0000000..5276ce3 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/JMSClientSubscription.html @@ -0,0 +1,331 @@ + + + + + +JMSClientSubscription + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class JMSClientSubscription

+
+
+ +
+
    +
  • +
    +
    +
    public class JMSClientSubscription
    +extends ClientSubscription
    +
    Contains information specific to JMS subscriptions
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JMSClientSubscription(java.lang.String clientId, + java.lang.String subscriptionIdentifier, + javax.jms.Session session, + javax.jms.MessageProducer producer, + javax.jms.MessageConsumer consumer) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voiddisconnect() +
      Closes both publishing and subscription endpoints
      +
      voidsendMessage(java.io.Serializable message) +
      Sends the message over established subscription to the publishing point
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JMSClientSubscription

        +
        public JMSClientSubscription(java.lang.String clientId,
        +                             java.lang.String subscriptionIdentifier,
        +                             javax.jms.Session session,
        +                             javax.jms.MessageProducer producer,
        +                             javax.jms.MessageConsumer consumer)
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/JMSUniversalClient.html b/java/doc/com/kaazing/client/universal/JMSUniversalClient.html new file mode 100644 index 0000000..c2e45c3 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/JMSUniversalClient.html @@ -0,0 +1,351 @@ + + + + + +JMSUniversalClient + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class JMSUniversalClient

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    UniversalClient, java.lang.AutoCloseable, javax.jms.ExceptionListener
    +
    +
    +
    +
    public class JMSUniversalClient
    +extends java.lang.Object
    +implements javax.jms.ExceptionListener, UniversalClient
    +
    JMS specific implementation of Universal Client
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      JMSUniversalClient(java.net.URI url, + java.lang.String login, + java.lang.String password, + ErrorsListener errorsListener) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voidclose() 
      voidonException(javax.jms.JMSException exception) 
      ClientSubscriptionsubscribe(java.lang.String pubTopicName, + java.lang.String subTopicName, + MessagesListener messageListener, + boolean noLocal) +
      Connects client to pub/sub endpoints
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        subscribe

        +
        public ClientSubscription subscribe(java.lang.String pubTopicName,
        +                                    java.lang.String subTopicName,
        +                                    MessagesListener messageListener,
        +                                    boolean noLocal)
        +                             throws ClientException
        +
        Description copied from interface: UniversalClient
        +
        Connects client to pub/sub endpoints
        +
        +
        Specified by:
        +
        subscribe in interface UniversalClient
        +
        Parameters:
        +
        pubTopicName - name of publishing topic
        +
        subTopicName - name of subscription topic
        +
        messageListener - callback to receive messages
        +
        noLocal - if true client will not receive its own messages (applicable only when pub and sub points are the same)
        +
        Returns:
        +
        subscription information
        +
        Throws:
        +
        ClientException - indicates that error occurred
        +
        +
      • +
      + + + +
        +
      • +

        onException

        +
        public void onException(javax.jms.JMSException exception)
        +
        +
        Specified by:
        +
        onException in interface javax.jms.ExceptionListener
        +
        +
      • +
      + + + +
        +
      • +

        close

        +
        public void close()
        +           throws java.lang.Exception
        +
        +
        Specified by:
        +
        close in interface java.lang.AutoCloseable
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/JMSUniversalClientTest.TestObject.html b/java/doc/com/kaazing/client/universal/JMSUniversalClientTest.TestObject.html new file mode 100644 index 0000000..c0b8c5a --- /dev/null +++ b/java/doc/com/kaazing/client/universal/JMSUniversalClientTest.TestObject.html @@ -0,0 +1,288 @@ + + + + + +JMSUniversalClientTest.TestObject + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class JMSUniversalClientTest.TestObject

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Enclosing class:
    +
    JMSUniversalClientTest
    +
    +
    +
    +
    public static class JMSUniversalClientTest.TestObject
    +extends java.lang.Object
    +implements java.io.Serializable
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      TestObject(int a, + java.lang.String b) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TestObject

        +
        public TestObject(int a,
        +                  java.lang.String b)
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/JMSUniversalClientTest.html b/java/doc/com/kaazing/client/universal/JMSUniversalClientTest.html new file mode 100644 index 0000000..619c085 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/JMSUniversalClientTest.html @@ -0,0 +1,377 @@ + + + + + +JMSUniversalClientTest + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class JMSUniversalClientTest

+
+
+ +
+
    +
  • +
    +
    +
    public class JMSUniversalClientTest
    +extends java.lang.Object
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        JMSUniversalClientTest

        +
        public JMSUniversalClientTest()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setUp

        +
        public void setUp()
        +           throws ClientException,
        +                  java.net.URISyntaxException
        +
        +
        Throws:
        +
        ClientException
        +
        java.net.URISyntaxException
        +
        +
      • +
      + + + +
        +
      • +

        testString

        +
        public void testString()
        +                throws ClientException,
        +                       java.lang.InterruptedException
        +
        +
        Throws:
        +
        ClientException
        +
        java.lang.InterruptedException
        +
        +
      • +
      + + + +
        +
      • +

        testObject

        +
        public void testObject()
        +                throws ClientException,
        +                       java.lang.InterruptedException
        +
        +
        Throws:
        +
        ClientException
        +
        java.lang.InterruptedException
        +
        +
      • +
      + + + +
        +
      • +

        testNoLocal

        +
        public void testNoLocal()
        +                 throws ClientException,
        +                        java.lang.InterruptedException
        +
        +
        Throws:
        +
        ClientException
        +
        java.lang.InterruptedException
        +
        +
      • +
      + + + +
        +
      • +

        shutDown

        +
        public void shutDown()
        +              throws java.lang.Exception
        +
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/MessagesListener.html b/java/doc/com/kaazing/client/universal/MessagesListener.html new file mode 100644 index 0000000..7d7542f --- /dev/null +++ b/java/doc/com/kaazing/client/universal/MessagesListener.html @@ -0,0 +1,231 @@ + + + + + +MessagesListener + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Interface MessagesListener

+
+
+
+
    +
  • +
    +
    +
    public interface MessagesListener
    +
    Listener for the messages received by Universal Client
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+
    +
  • + + +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onMessage

        +
        void onMessage(java.io.Serializable message)
        +
        Called when message is received
        +
        +
        Parameters:
        +
        message - body of the message
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/SubscriptionConnection.html b/java/doc/com/kaazing/client/universal/SubscriptionConnection.html new file mode 100644 index 0000000..2f45bc1 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/SubscriptionConnection.html @@ -0,0 +1,331 @@ + + + + + +SubscriptionConnection + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class SubscriptionConnection

+
+
+ +
+
    +
  • +
    +
    +
    public class SubscriptionConnection
    +extends ClientSubscription
    +
    Contains information specific to JMS subscriptions
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      SubscriptionConnection(java.lang.String clientId, + java.lang.String connectionIdentifier, + javax.jms.Session session, + javax.jms.MessageProducer producer, + javax.jms.MessageConsumer consumer) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voiddisconnect() +
      Closes connection to both publishing and subscription endpoints
      +
      voidsendMessage(java.io.Serializable message) +
      Sends the message over established connection to the publishing point
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        SubscriptionConnection

        +
        public SubscriptionConnection(java.lang.String clientId,
        +                              java.lang.String connectionIdentifier,
        +                              javax.jms.Session session,
        +                              javax.jms.MessageProducer producer,
        +                              javax.jms.MessageConsumer consumer)
        +
      • +
      +
    • +
    + + +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/UniversalClient.html b/java/doc/com/kaazing/client/universal/UniversalClient.html new file mode 100644 index 0000000..2eeb5d3 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/UniversalClient.html @@ -0,0 +1,261 @@ + + + + + +UniversalClient + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Interface UniversalClient

+
+
+
+
    +
  • +
    +
    All Superinterfaces:
    +
    java.lang.AutoCloseable
    +
    +
    +
    All Known Implementing Classes:
    +
    AmqpUniversalClient, JMSUniversalClient
    +
    +
    +
    +
    public interface UniversalClient
    +extends java.lang.AutoCloseable
    +
    Interface for Kaazing protocol independent universal client
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        subscribe

        +
        ClientSubscription subscribe(java.lang.String pubTopicName,
        +                             java.lang.String subTopicName,
        +                             MessagesListener messageListener,
        +                             boolean noLocal)
        +                      throws ClientException
        +
        Connects client to pub/sub endpoints
        +
        +
        Parameters:
        +
        pubTopicName - name of publishing topic
        +
        subTopicName - name of subscription topic
        +
        messageListener - callback to receive messages
        +
        noLocal - if true client will not receive its own messages (applicable only when pub and sub points are the same)
        +
        Returns:
        +
        subscription information
        +
        Throws:
        +
        ClientException - indicates that error occurred
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/UniversalClientFactory.html b/java/doc/com/kaazing/client/universal/UniversalClientFactory.html new file mode 100644 index 0000000..d03f45e --- /dev/null +++ b/java/doc/com/kaazing/client/universal/UniversalClientFactory.html @@ -0,0 +1,264 @@ + + + + + +UniversalClientFactory + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class UniversalClientFactory

+
+
+ +
+
    +
  • +
    +
    +
    public class UniversalClientFactory
    +extends java.lang.Object
    +
    Factory to create an instance of Universal Client
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        createUniversalClient

        +
        public static UniversalClient createUniversalClient(UniversalClientProtocol protocol,
        +                                                    java.net.URI url,
        +                                                    java.lang.String login,
        +                                                    java.lang.String password,
        +                                                    ErrorsListener errorsListener)
        +                                             throws ClientException
        +
        Constructs an instance of Universal client specific to protocols
        +
        +
        Parameters:
        +
        protocol - Protocol to use
        +
        url - URL to Kaazing Gateway
        +
        login - Login to use with Kaazing Gateway
        +
        password - Login to use with Kaazing Gateway
        +
        errorsListener - Callback to handle client errors
        +
        Returns:
        +
        instance of Universal Client specific to a selected protocol
        +
        Throws:
        +
        ClientException - indicates an error
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/UniversalClientProtocol.html b/java/doc/com/kaazing/client/universal/UniversalClientProtocol.html new file mode 100644 index 0000000..97f4579 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/UniversalClientProtocol.html @@ -0,0 +1,339 @@ + + + + + +UniversalClientProtocol + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Enum UniversalClientProtocol

+
+
+ +
+ +
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + +
      Enum Constants 
      Enum Constant and Description
      amqp 
      jms 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static UniversalClientProtocolvalueOf(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static UniversalClientProtocol[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static UniversalClientProtocol[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (UniversalClientProtocol c : UniversalClientProtocol.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static UniversalClientProtocol valueOf(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/Utils.html b/java/doc/com/kaazing/client/universal/Utils.html new file mode 100644 index 0000000..17fb684 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/Utils.html @@ -0,0 +1,330 @@ + + + + + +Utils + + + + + + + + +
+ + + + + + + +
+ + + +
+
com.kaazing.client.universal
+

Class Utils

+
+
+ +
+
    +
  • +
    +
    +
    public class Utils
    +extends java.lang.Object
    +
    Provides implementation of commonly used utils
    +
    +
    Author:
    +
    romans
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Utils() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static java.io.Serializabledeserialize(byte[] bytes) +
      Deserializes the object from byte array
      +
      static java.lang.StringgenerateIdentifier(java.lang.String url, + java.lang.String pubTopicName, + java.lang.String subTopicName) 
      static byte[]serialize(java.io.Serializable obj) +
      Serializes java object to bytes
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Utils

        +
        public Utils()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        serialize

        +
        public static byte[] serialize(java.io.Serializable obj)
        +                        throws java.io.IOException
        +
        Serializes java object to bytes
        +
        +
        Parameters:
        +
        obj - Object to serialize
        +
        Returns:
        +
        byte array containing serialized objects
        +
        Throws:
        +
        java.io.IOException - indicates that object cannot be serialized
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public static java.io.Serializable deserialize(byte[] bytes)
        +                                        throws java.io.IOException,
        +                                               java.lang.ClassNotFoundException
        +
        Deserializes the object from byte array
        +
        +
        Parameters:
        +
        bytes - byte array containing the object
        +
        Returns:
        +
        Deserialized object
        +
        Throws:
        +
        java.io.IOException - indicates that deserialization cannot be performed due to IO error
        +
        java.lang.ClassNotFoundException - indicates that deserialization cannot be performed due to the abscence of suitable class
        +
        +
      • +
      + + + +
        +
      • +

        generateIdentifier

        +
        public static java.lang.String generateIdentifier(java.lang.String url,
        +                                                  java.lang.String pubTopicName,
        +                                                  java.lang.String subTopicName)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/AmqpClientSubscription.html b/java/doc/com/kaazing/client/universal/class-use/AmqpClientSubscription.html new file mode 100644 index 0000000..99ee1b2 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/AmqpClientSubscription.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.AmqpClientSubscription + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.AmqpClientSubscription

+
+
No usage of com.kaazing.client.universal.AmqpClientSubscription
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/AmqpMessageEnvelope.html b/java/doc/com/kaazing/client/universal/class-use/AmqpMessageEnvelope.html new file mode 100644 index 0000000..a179911 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/AmqpMessageEnvelope.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.AmqpMessageEnvelope + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.AmqpMessageEnvelope

+
+
No usage of com.kaazing.client.universal.AmqpMessageEnvelope
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/AmqpUniversalClient.html b/java/doc/com/kaazing/client/universal/class-use/AmqpUniversalClient.html new file mode 100644 index 0000000..0352704 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/AmqpUniversalClient.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.AmqpUniversalClient + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.AmqpUniversalClient

+
+
No usage of com.kaazing.client.universal.AmqpUniversalClient
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/AmqpUniversalClientTest.TestObject.html b/java/doc/com/kaazing/client/universal/class-use/AmqpUniversalClientTest.TestObject.html new file mode 100644 index 0000000..5a9fd07 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/AmqpUniversalClientTest.TestObject.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.AmqpUniversalClientTest.TestObject + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.AmqpUniversalClientTest.TestObject

+
+
No usage of com.kaazing.client.universal.AmqpUniversalClientTest.TestObject
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/AmqpUniversalClientTest.html b/java/doc/com/kaazing/client/universal/class-use/AmqpUniversalClientTest.html new file mode 100644 index 0000000..fc92a79 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/AmqpUniversalClientTest.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.AmqpUniversalClientTest + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.AmqpUniversalClientTest

+
+
No usage of com.kaazing.client.universal.AmqpUniversalClientTest
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/ClientException.html b/java/doc/com/kaazing/client/universal/class-use/ClientException.html new file mode 100644 index 0000000..3a09853 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/ClientException.html @@ -0,0 +1,271 @@ + + + + + +Uses of Class com.kaazing.client.universal.ClientException + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.ClientException

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/ClientSubscription.html b/java/doc/com/kaazing/client/universal/class-use/ClientSubscription.html new file mode 100644 index 0000000..3562fb6 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/ClientSubscription.html @@ -0,0 +1,187 @@ + + + + + +Uses of Class com.kaazing.client.universal.ClientSubscription + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.ClientSubscription

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/ErrorsListener.html b/java/doc/com/kaazing/client/universal/class-use/ErrorsListener.html new file mode 100644 index 0000000..7b7c305 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/ErrorsListener.html @@ -0,0 +1,173 @@ + + + + + +Uses of Interface com.kaazing.client.universal.ErrorsListener + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Interface
com.kaazing.client.universal.ErrorsListener

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/JMSClientSubscription.html b/java/doc/com/kaazing/client/universal/class-use/JMSClientSubscription.html new file mode 100644 index 0000000..a12659d --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/JMSClientSubscription.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.JMSClientSubscription + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.JMSClientSubscription

+
+
No usage of com.kaazing.client.universal.JMSClientSubscription
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/JMSUniversalClient.html b/java/doc/com/kaazing/client/universal/class-use/JMSUniversalClient.html new file mode 100644 index 0000000..0a9c4df --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/JMSUniversalClient.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.JMSUniversalClient + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.JMSUniversalClient

+
+
No usage of com.kaazing.client.universal.JMSUniversalClient
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/JMSUniversalClientTest.TestObject.html b/java/doc/com/kaazing/client/universal/class-use/JMSUniversalClientTest.TestObject.html new file mode 100644 index 0000000..ba8fb03 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/JMSUniversalClientTest.TestObject.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.JMSUniversalClientTest.TestObject + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.JMSUniversalClientTest.TestObject

+
+
No usage of com.kaazing.client.universal.JMSUniversalClientTest.TestObject
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/JMSUniversalClientTest.html b/java/doc/com/kaazing/client/universal/class-use/JMSUniversalClientTest.html new file mode 100644 index 0000000..ba6bc80 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/JMSUniversalClientTest.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.JMSUniversalClientTest + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.JMSUniversalClientTest

+
+
No usage of com.kaazing.client.universal.JMSUniversalClientTest
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/MessagesListener.html b/java/doc/com/kaazing/client/universal/class-use/MessagesListener.html new file mode 100644 index 0000000..2bf924f --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/MessagesListener.html @@ -0,0 +1,166 @@ + + + + + +Uses of Interface com.kaazing.client.universal.MessagesListener + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Interface
com.kaazing.client.universal.MessagesListener

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/SubscriptionConnection.html b/java/doc/com/kaazing/client/universal/class-use/SubscriptionConnection.html new file mode 100644 index 0000000..ea6868b --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/SubscriptionConnection.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.SubscriptionConnection + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.SubscriptionConnection

+
+
No usage of com.kaazing.client.universal.SubscriptionConnection
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/UniversalClient.html b/java/doc/com/kaazing/client/universal/class-use/UniversalClient.html new file mode 100644 index 0000000..de04950 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/UniversalClient.html @@ -0,0 +1,174 @@ + + + + + +Uses of Interface com.kaazing.client.universal.UniversalClient + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Interface
com.kaazing.client.universal.UniversalClient

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/UniversalClientFactory.html b/java/doc/com/kaazing/client/universal/class-use/UniversalClientFactory.html new file mode 100644 index 0000000..1b93861 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/UniversalClientFactory.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.UniversalClientFactory + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.UniversalClientFactory

+
+
No usage of com.kaazing.client.universal.UniversalClientFactory
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/UniversalClientProtocol.html b/java/doc/com/kaazing/client/universal/class-use/UniversalClientProtocol.html new file mode 100644 index 0000000..246d89b --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/UniversalClientProtocol.html @@ -0,0 +1,175 @@ + + + + + +Uses of Class com.kaazing.client.universal.UniversalClientProtocol + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.UniversalClientProtocol

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/class-use/Utils.html b/java/doc/com/kaazing/client/universal/class-use/Utils.html new file mode 100644 index 0000000..521c229 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/class-use/Utils.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class com.kaazing.client.universal.Utils + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Class
com.kaazing.client.universal.Utils

+
+
No usage of com.kaazing.client.universal.Utils
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/package-frame.html b/java/doc/com/kaazing/client/universal/package-frame.html new file mode 100644 index 0000000..7555b5c --- /dev/null +++ b/java/doc/com/kaazing/client/universal/package-frame.html @@ -0,0 +1,45 @@ + + + + + +com.kaazing.client.universal + + + + + +

com.kaazing.client.universal

+
+

Interfaces

+ +

Classes

+ +

Enums

+ +

Exceptions

+ +
+ + diff --git a/java/doc/com/kaazing/client/universal/package-summary.html b/java/doc/com/kaazing/client/universal/package-summary.html new file mode 100644 index 0000000..35fcbf1 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/package-summary.html @@ -0,0 +1,261 @@ + + + + + +com.kaazing.client.universal + + + + + + + + +
+ + + + + + + +
+ + +
+

Package com.kaazing.client.universal

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/package-tree.html b/java/doc/com/kaazing/client/universal/package-tree.html new file mode 100644 index 0000000..06a2099 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/package-tree.html @@ -0,0 +1,176 @@ + + + + + +com.kaazing.client.universal Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For Package com.kaazing.client.universal

+
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/com/kaazing/client/universal/package-use.html b/java/doc/com/kaazing/client/universal/package-use.html new file mode 100644 index 0000000..0290188 --- /dev/null +++ b/java/doc/com/kaazing/client/universal/package-use.html @@ -0,0 +1,165 @@ + + + + + +Uses of Package com.kaazing.client.universal + + + + + + + + +
+ + + + + + + +
+ + +
+

Uses of Package
com.kaazing.client.universal

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/constant-values.html b/java/doc/constant-values.html new file mode 100644 index 0000000..f6f7bb6 --- /dev/null +++ b/java/doc/constant-values.html @@ -0,0 +1,122 @@ + + + + + +Constant Field Values + + + + + + + + +
+ + + + + + + +
+ + +
+

Constant Field Values

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/deprecated-list.html b/java/doc/deprecated-list.html new file mode 100644 index 0000000..0b58968 --- /dev/null +++ b/java/doc/deprecated-list.html @@ -0,0 +1,122 @@ + + + + + +Deprecated List + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/help-doc.html b/java/doc/help-doc.html new file mode 100644 index 0000000..2204d2f --- /dev/null +++ b/java/doc/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API Help + + + + + + + + +
+ + + + + + + +
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+ +This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-1.html b/java/doc/index-files/index-1.html new file mode 100644 index 0000000..9149da1 --- /dev/null +++ b/java/doc/index-files/index-1.html @@ -0,0 +1,149 @@ + + + + + +A-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

A

+
+
AmqpClientSubscription - Class in com.kaazing.client.universal
+
+
Contains information specific to AMQP subscriptions
+
+
AmqpClientSubscription(String, String, String, String, String, AmqpChannel, AmqpChannel) - Constructor for class com.kaazing.client.universal.AmqpClientSubscription
+
 
+
AmqpMessageEnvelope - Class in com.kaazing.client.universal
+
+
Adds the sender ID to the message so it can be used for noLocal filtering when it is not supported by the server
+
+
AmqpMessageEnvelope(String, Serializable) - Constructor for class com.kaazing.client.universal.AmqpMessageEnvelope
+
 
+
AmqpUniversalClient - Class in com.kaazing.client.universal
+
+
AMQP specific implmentation of Universal client
+
+
AmqpUniversalClient(URI, String, String, ErrorsListener) - Constructor for class com.kaazing.client.universal.AmqpUniversalClient
+
 
+
AmqpUniversalClientTest - Class in com.kaazing.client.universal
+
 
+
AmqpUniversalClientTest() - Constructor for class com.kaazing.client.universal.AmqpUniversalClientTest
+
 
+
AmqpUniversalClientTest.TestObject - Class in com.kaazing.client.universal
+
 
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-10.html b/java/doc/index-files/index-10.html new file mode 100644 index 0000000..8a1ac5b --- /dev/null +++ b/java/doc/index-files/index-10.html @@ -0,0 +1,147 @@ + + + + + +T-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

T

+
+
testNoLocal() - Method in class com.kaazing.client.universal.AmqpUniversalClientTest
+
 
+
testNoLocal() - Method in class com.kaazing.client.universal.JMSUniversalClientTest
+
 
+
testObject() - Method in class com.kaazing.client.universal.AmqpUniversalClientTest
+
 
+
TestObject(int, String) - Constructor for class com.kaazing.client.universal.AmqpUniversalClientTest.TestObject
+
 
+
testObject() - Method in class com.kaazing.client.universal.JMSUniversalClientTest
+
 
+
TestObject(int, String) - Constructor for class com.kaazing.client.universal.JMSUniversalClientTest.TestObject
+
 
+
testString() - Method in class com.kaazing.client.universal.AmqpUniversalClientTest
+
 
+
testString() - Method in class com.kaazing.client.universal.JMSUniversalClientTest
+
 
+
toString() - Method in class com.kaazing.client.universal.AmqpMessageEnvelope
+
 
+
toString() - Method in class com.kaazing.client.universal.AmqpUniversalClientTest.TestObject
+
 
+
toString() - Method in class com.kaazing.client.universal.JMSUniversalClientTest.TestObject
+
 
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-11.html b/java/doc/index-files/index-11.html new file mode 100644 index 0000000..14d6739 --- /dev/null +++ b/java/doc/index-files/index-11.html @@ -0,0 +1,141 @@ + + + + + +U-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

U

+
+
UniversalClient - Interface in com.kaazing.client.universal
+
+
Interface for Kaazing protocol independent universal client
+
+
UniversalClientFactory - Class in com.kaazing.client.universal
+
+
Factory to create an instance of Universal Client
+
+
UniversalClientProtocol - Enum in com.kaazing.client.universal
+
 
+
Utils - Class in com.kaazing.client.universal
+
+
Provides implementation of commonly used utils
+
+
Utils() - Constructor for class com.kaazing.client.universal.Utils
+
 
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-12.html b/java/doc/index-files/index-12.html new file mode 100644 index 0000000..097b17f --- /dev/null +++ b/java/doc/index-files/index-12.html @@ -0,0 +1,134 @@ + + + + + +V-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

V

+
+
valueOf(String) - Static method in enum com.kaazing.client.universal.UniversalClientProtocol
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum com.kaazing.client.universal.UniversalClientProtocol
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-2.html b/java/doc/index-files/index-2.html new file mode 100644 index 0000000..3c45ce4 --- /dev/null +++ b/java/doc/index-files/index-2.html @@ -0,0 +1,153 @@ + + + + + +C-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

C

+
+
ClientException - Exception in com.kaazing.client.universal
+
+
Contains the exception reported by Universal Client
+
+
ClientException(String, Throwable) - Constructor for exception com.kaazing.client.universal.ClientException
+
 
+
ClientException(String) - Constructor for exception com.kaazing.client.universal.ClientException
+
 
+
ClientException(Throwable) - Constructor for exception com.kaazing.client.universal.ClientException
+
 
+
ClientSubscription - Class in com.kaazing.client.universal
+
+
Contains information about subscription
+
+
ClientSubscription(String) - Constructor for class com.kaazing.client.universal.ClientSubscription
+
+
Construct the subscription object.
+
+
close() - Method in class com.kaazing.client.universal.AmqpUniversalClient
+
 
+
close() - Method in class com.kaazing.client.universal.JMSUniversalClient
+
 
+
com.kaazing.client.universal - package com.kaazing.client.universal
+
 
+
createUniversalClient(UniversalClientProtocol, URI, String, String, ErrorsListener) - Static method in class com.kaazing.client.universal.UniversalClientFactory
+
+
Constructs an instance of Universal client specific to protocols
+
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-3.html b/java/doc/index-files/index-3.html new file mode 100644 index 0000000..2a2a6a5 --- /dev/null +++ b/java/doc/index-files/index-3.html @@ -0,0 +1,137 @@ + + + + + +D-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

D

+
+
deserialize(byte[]) - Static method in class com.kaazing.client.universal.Utils
+
+
Deserializes the object from byte array
+
+
disconnect() - Method in class com.kaazing.client.universal.AmqpClientSubscription
+
 
+
disconnect() - Method in class com.kaazing.client.universal.ClientSubscription
+
+
Closes both publishing and subscription endpoints
+
+
disconnect() - Method in class com.kaazing.client.universal.JMSClientSubscription
+
 
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-4.html b/java/doc/index-files/index-4.html new file mode 100644 index 0000000..813f777 --- /dev/null +++ b/java/doc/index-files/index-4.html @@ -0,0 +1,129 @@ + + + + + +E-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

E

+
+
ErrorsListener - Interface in com.kaazing.client.universal
+
+
Provides implementation for calback to handle the errors
+
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-5.html b/java/doc/index-files/index-5.html new file mode 100644 index 0000000..62eb018 --- /dev/null +++ b/java/doc/index-files/index-5.html @@ -0,0 +1,133 @@ + + + + + +G-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

G

+
+
generateIdentifier(String, String, String) - Static method in class com.kaazing.client.universal.Utils
+
 
+
getClientId() - Method in class com.kaazing.client.universal.AmqpMessageEnvelope
+
 
+
getData() - Method in class com.kaazing.client.universal.AmqpMessageEnvelope
+
 
+
getSubscriptionIdentifier() - Method in class com.kaazing.client.universal.ClientSubscription
+
 
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-6.html b/java/doc/index-files/index-6.html new file mode 100644 index 0000000..2fee8ff --- /dev/null +++ b/java/doc/index-files/index-6.html @@ -0,0 +1,143 @@ + + + + + +J-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

J

+
+
JMSClientSubscription - Class in com.kaazing.client.universal
+
+
Contains information specific to JMS subscriptions
+
+
JMSClientSubscription(String, String, Session, MessageProducer, MessageConsumer) - Constructor for class com.kaazing.client.universal.JMSClientSubscription
+
 
+
JMSUniversalClient - Class in com.kaazing.client.universal
+
+
JMS specific implementation of Universal Client
+
+
JMSUniversalClient(URI, String, String, ErrorsListener) - Constructor for class com.kaazing.client.universal.JMSUniversalClient
+
 
+
JMSUniversalClientTest - Class in com.kaazing.client.universal
+
 
+
JMSUniversalClientTest() - Constructor for class com.kaazing.client.universal.JMSUniversalClientTest
+
 
+
JMSUniversalClientTest.TestObject - Class in com.kaazing.client.universal
+
 
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-7.html b/java/doc/index-files/index-7.html new file mode 100644 index 0000000..2bd93cb --- /dev/null +++ b/java/doc/index-files/index-7.html @@ -0,0 +1,129 @@ + + + + + +M-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

M

+
+
MessagesListener - Interface in com.kaazing.client.universal
+
+
Listener for the messages received by Universal Client
+
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-8.html b/java/doc/index-files/index-8.html new file mode 100644 index 0000000..8f7d008 --- /dev/null +++ b/java/doc/index-files/index-8.html @@ -0,0 +1,135 @@ + + + + + +O-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

O

+
+
onException(ClientException) - Method in interface com.kaazing.client.universal.ErrorsListener
+
+
Called by the Universal Client when exception occurs
+
+
onException(JMSException) - Method in class com.kaazing.client.universal.JMSUniversalClient
+
 
+
onMessage(Serializable) - Method in interface com.kaazing.client.universal.MessagesListener
+
+
Called when message is received
+
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index-files/index-9.html b/java/doc/index-files/index-9.html new file mode 100644 index 0000000..b5938a2 --- /dev/null +++ b/java/doc/index-files/index-9.html @@ -0,0 +1,153 @@ + + + + + +S-Index + + + + + + + + +
+ + + + + + + +
+ + +
A C D E G J M O S T U V  + + +

S

+
+
sendMessage(Serializable) - Method in class com.kaazing.client.universal.AmqpClientSubscription
+
 
+
sendMessage(Serializable) - Method in class com.kaazing.client.universal.ClientSubscription
+
+
Sends the message over established subscription to the publishing point
+
+
sendMessage(Serializable) - Method in class com.kaazing.client.universal.JMSClientSubscription
+
 
+
serialize(Serializable) - Static method in class com.kaazing.client.universal.Utils
+
+
Serializes java object to bytes
+
+
setUp() - Method in class com.kaazing.client.universal.AmqpUniversalClientTest
+
 
+
setUp() - Method in class com.kaazing.client.universal.JMSUniversalClientTest
+
 
+
shutDown() - Method in class com.kaazing.client.universal.AmqpUniversalClientTest
+
 
+
shutDown() - Method in class com.kaazing.client.universal.JMSUniversalClientTest
+
 
+
subscribe(String, String, MessagesListener, boolean) - Method in class com.kaazing.client.universal.AmqpUniversalClient
+
 
+
subscribe(String, String, MessagesListener, boolean) - Method in class com.kaazing.client.universal.JMSUniversalClient
+
 
+
subscribe(String, String, MessagesListener, boolean) - Method in interface com.kaazing.client.universal.UniversalClient
+
+
Connects client to pub/sub endpoints
+
+
+A C D E G J M O S T U V 
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/index.html b/java/doc/index.html new file mode 100644 index 0000000..cfcd673 --- /dev/null +++ b/java/doc/index.html @@ -0,0 +1,71 @@ + + + + + +Generated Documentation (Untitled) + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="com/kaazing/client/universal/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/java/doc/overview-tree.html b/java/doc/overview-tree.html new file mode 100644 index 0000000..88d95cc --- /dev/null +++ b/java/doc/overview-tree.html @@ -0,0 +1,180 @@ + + + + + +Class Hierarchy + + + + + + + + +
+ + + + + + + +
+ + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +

Interface Hierarchy

+ +

Enum Hierarchy

+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/package-list b/java/doc/package-list new file mode 100644 index 0000000..748199e --- /dev/null +++ b/java/doc/package-list @@ -0,0 +1 @@ +com.kaazing.client.universal diff --git a/java/doc/script.js b/java/doc/script.js new file mode 100644 index 0000000..b346356 --- /dev/null +++ b/java/doc/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/java/doc/serialized-form.html b/java/doc/serialized-form.html new file mode 100644 index 0000000..0742872 --- /dev/null +++ b/java/doc/serialized-form.html @@ -0,0 +1,211 @@ + + + + + +Serialized Form + + + + + + + + +
+ + + + + + + +
+ + +
+

Serialized Form

+
+
+ +
+ +
+ + + + + + + +
+ + + + diff --git a/java/doc/stylesheet.css b/java/doc/stylesheet.css new file mode 100644 index 0000000..98055b2 --- /dev/null +++ b/java/doc/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/java/images/JavaUniversalClient.png b/java/images/JavaUniversalClient.png new file mode 100644 index 0000000..c7324d0 Binary files /dev/null and b/java/images/JavaUniversalClient.png differ diff --git a/java/src/main/java/com/kaazing/client/universal/AmqpClientSubscription.java b/java/src/main/java/com/kaazing/client/universal/AmqpClientSubscription.java index baee3d1..76df607 100644 --- a/java/src/main/java/com/kaazing/client/universal/AmqpClientSubscription.java +++ b/java/src/main/java/com/kaazing/client/universal/AmqpClientSubscription.java @@ -27,8 +27,8 @@ public class AmqpClientSubscription extends ClientSubscription { private String pubChannelName; private String queueName; - public AmqpClientSubscription(String connectionIdentifier, String appId, String userId, String pubChannelName, String queueName, AmqpChannel pubChannel, AmqpChannel subChannel) { - super(connectionIdentifier); + public AmqpClientSubscription(String subscriptionIdentifier, String appId, String userId, String pubChannelName, String queueName, AmqpChannel pubChannel, AmqpChannel subChannel) { + super(subscriptionIdentifier); this.pubChannel = pubChannel; this.subChannel = subChannel; this.pubChannelName = pubChannelName; @@ -44,7 +44,7 @@ public void sendMessage(Serializable message) throws ClientException { try { serializedObject = Utils.serialize(messageEnvelope); } catch (IOException e) { - throw new ClientException("Cannot serialize message " + message + " to send over connection " + this.getConnectionIdentifier(), e); + throw new ClientException("Cannot serialize message " + message + " to send over subscription " + this.getSubscriptionIdentifier(), e); } ByteBuffer buffer = ByteBuffer.allocate(serializedObject.length); buffer.put(serializedObject); @@ -61,7 +61,7 @@ public void sendMessage(Serializable message) throws ClientException { props.setTimestamp(ts); this.pubChannel.publishBasic(buffer, props, this.pubChannelName, AmqpUniversalClient.ROUTING_KEY, false, false); - AmqpUniversalClient.LOGGER.debug("Sent message [" + message.toString() + "] to connection to " + this.getConnectionIdentifier()); + AmqpUniversalClient.LOGGER.debug("Sent message [" + message.toString() + "] to subscription to " + this.getSubscriptionIdentifier()); } @Override diff --git a/java/src/main/java/com/kaazing/client/universal/AmqpUniversalClient.java b/java/src/main/java/com/kaazing/client/universal/AmqpUniversalClient.java index 65baec2..4321c3a 100644 --- a/java/src/main/java/com/kaazing/client/universal/AmqpUniversalClient.java +++ b/java/src/main/java/com/kaazing/client/universal/AmqpUniversalClient.java @@ -72,8 +72,8 @@ public void onConnectionClose(ConnectionEvent e) { try { conn.disconnect(); } catch (ClientException e1) { - errorsListener.onException(new ClientException("Error closing client connection: "+conn.getConnectionIdentifier(), e1)); - LOGGER.error("Error closing client connection: "+conn.getConnectionIdentifier(), e1); + errorsListener.onException(new ClientException("Error closing client connection: "+conn.getSubscriptionIdentifier(), e1)); + LOGGER.error("Error closing client connection: "+conn.getSubscriptionIdentifier(), e1); } } LOGGER.info("Closed connection to "+url+"."); @@ -107,7 +107,7 @@ public void close() throws Exception { } @Override - public ClientSubscription connect(String pubTopicName, String subTopicName, MessagesListener messageListener, boolean noLocal) throws ClientException { + public ClientSubscription subscribe(String pubTopicName, String subTopicName, MessagesListener messageListener, boolean noLocal) throws ClientException { CountDownLatch connectionsLatch = new CountDownLatch(2); AmqpChannel pubChannel = this.amqpClient.openChannel(); fPubOpened = false; diff --git a/java/src/main/java/com/kaazing/client/universal/ClientSubscription.java b/java/src/main/java/com/kaazing/client/universal/ClientSubscription.java index 27824f4..8b0ccba 100644 --- a/java/src/main/java/com/kaazing/client/universal/ClientSubscription.java +++ b/java/src/main/java/com/kaazing/client/universal/ClientSubscription.java @@ -11,30 +11,30 @@ * */ public abstract class ClientSubscription { - private final String connectionIdentifier; + private final String subscriptionIdentifier; /** - * Construct the connection object. The constructor should be overwritten by the implementation classes. - * @param connectionIdentifier + * Construct the subscription object. The constructor should be overwritten by the implementation classes. + * @param subscriptionIdentifier Identification of the subscription that is automatically generated when subscription is created. */ - public ClientSubscription(String connectionIdentifier){ - this.connectionIdentifier=connectionIdentifier; + public ClientSubscription(String subscriptionIdentifier){ + this.subscriptionIdentifier=subscriptionIdentifier; } /** - * Sends the message over established connection to the publishing point + * Sends the message over established subscription to the publishing point * @param message message to send * @throws ClientException indicates that error occurred */ public abstract void sendMessage(Serializable message) throws ClientException; /** - * Closes connection to both publishing and subscription endpoints - * @throws ClientException + * Closes both publishing and subscription endpoints + * @throws ClientException indicates that error occurred */ public abstract void disconnect() throws ClientException; - public String getConnectionIdentifier() { - return connectionIdentifier; + public String getSubscriptionIdentifier() { + return subscriptionIdentifier; } } diff --git a/java/src/main/java/com/kaazing/client/universal/SubscriptionConnection.java b/java/src/main/java/com/kaazing/client/universal/JMSClientSubscription.java similarity index 52% rename from java/src/main/java/com/kaazing/client/universal/SubscriptionConnection.java rename to java/src/main/java/com/kaazing/client/universal/JMSClientSubscription.java index 631da6e..6b46d54 100644 --- a/java/src/main/java/com/kaazing/client/universal/SubscriptionConnection.java +++ b/java/src/main/java/com/kaazing/client/universal/JMSClientSubscription.java @@ -17,15 +17,15 @@ * @author romans * */ -public class SubscriptionConnection extends ClientSubscription { +public class JMSClientSubscription extends ClientSubscription { private final MessageProducer producer; private final MessageConsumer consumer; private boolean opened=true; private final Session session; private String clientId; - public SubscriptionConnection(String clientId, String connectionIdentifier, Session session, MessageProducer producer, MessageConsumer consumer) { - super(connectionIdentifier); + public JMSClientSubscription(String clientId, String subscriptionIdentifier, Session session, MessageProducer producer, MessageConsumer consumer) { + super(subscriptionIdentifier); this.producer=producer; this.consumer=consumer; this.session=session; @@ -38,27 +38,27 @@ public void sendMessage(Serializable message) throws ClientException { try { bytesMessage = session.createBytesMessage(); } catch (JMSException e) { - throw new ClientException("Connection: "+this.getConnectionIdentifier()+" - Cannot create a BytesMessage for an object " + message.toString(), e); + throw new ClientException("Subscription: "+this.getSubscriptionIdentifier()+" - Cannot create a BytesMessage for an object " + message.toString(), e); } try { bytesMessage.writeBytes(Utils.serialize(message)); } catch (JMSException e) { - throw new ClientException("Connection: "+this.getConnectionIdentifier()+" - Cannot write bytes to set the payload of a BytesMessage for an object " + message.toString(), e); + throw new ClientException("Subscription: "+this.getSubscriptionIdentifier()+" - Cannot write bytes to set the payload of a BytesMessage for an object " + message.toString(), e); } catch (IOException e) { - throw new ClientException("Connection: "+this.getConnectionIdentifier()+" - Cannot serialize an object " + message.toString(), e); + throw new ClientException("Subscription: "+this.getSubscriptionIdentifier()+" - Cannot serialize an object " + message.toString(), e); } if (clientId!=null){ try { bytesMessage.setStringProperty("clientId", clientId); } catch (JMSException e) { - throw new ClientException("Connection: "+this.getConnectionIdentifier()+" - Cannot set a string property client id to "+clientId+" for an object " + message.toString(), e); + throw new ClientException("Subscription: "+this.getSubscriptionIdentifier()+" - Cannot set a string property client id to "+clientId+" for an object " + message.toString(), e); } } try { producer.send(bytesMessage); - JMSUniversalClient.LOGGER.debug("Sent message ["+message.toString()+"] to connection to "+this.getConnectionIdentifier()); + JMSUniversalClient.LOGGER.debug("Sent message ["+message.toString()+"] to subscription to "+this.getSubscriptionIdentifier()); } catch (JMSException e) { - throw new ClientException("Connection: "+this.getConnectionIdentifier()+" - Cannot sent and object message for an object " + message.toString(), e); + throw new ClientException("Subscription: "+this.getSubscriptionIdentifier()+" - Cannot sent and object message for an object " + message.toString(), e); } } @@ -69,12 +69,12 @@ public void disconnect() throws ClientException { try { this.producer.close(); } catch (JMSException e) { - throw new ClientException("Connection: "+this.getConnectionIdentifier()+" - Error closing producer for connection "+this.getConnectionIdentifier(),e); + throw new ClientException("Subscription: "+this.getSubscriptionIdentifier()+" - Error closing producer.",e); } try { this.consumer.close(); } catch (JMSException e) { - throw new ClientException("Connection: "+this.getConnectionIdentifier()+" - Error closing consumer for connection "+this.getConnectionIdentifier(),e); + throw new ClientException("Subscription: "+this.getSubscriptionIdentifier()+" - Error closing consumer.",e); } opened=false; } diff --git a/java/src/main/java/com/kaazing/client/universal/JMSUniversalClient.java b/java/src/main/java/com/kaazing/client/universal/JMSUniversalClient.java index 9b38972..37ef643 100644 --- a/java/src/main/java/com/kaazing/client/universal/JMSUniversalClient.java +++ b/java/src/main/java/com/kaazing/client/universal/JMSUniversalClient.java @@ -44,7 +44,7 @@ public class JMSUniversalClient implements ExceptionListener, UniversalClient { private final ConnectionFactory connectionFactory; private Connection connection; private Session session; - private List connections=new ArrayList<>(); + private List connections=new ArrayList<>(); private String url; protected static Logger LOGGER=LoggerFactory.getLogger(JMSUniversalClient.class); @@ -97,7 +97,7 @@ public JMSUniversalClient(URI url, String login, String password, ErrorsListener * @see com.kaazing.client.universal.UniversalClientProtocolImpl#connect(java.lang.String, java.lang.String, com.kaazing.client.universal.MessagesListener, boolean) */ @Override - public ClientSubscription connect(String pubTopicName, String subTopicName, MessagesListener messageListener, boolean noLocal) throws ClientException { + public ClientSubscription subscribe(String pubTopicName, String subTopicName, MessagesListener messageListener, boolean noLocal) throws ClientException { String clientId=null; Destination subDestination; try { @@ -137,7 +137,7 @@ public ClientSubscription connect(String pubTopicName, String subTopicName, Mess throw new ClientException("Cannot create producer for publishing topic " + pubTopicName, e); } LOGGER.info("Connected to publishing topic "+pubTopicName+" for connection to "+this.url); - SubscriptionConnection clientConnection=new SubscriptionConnection(clientId, Utils.generateIdentifier(this.url, pubTopicName, subTopicName), this.session, producer, consumer); + JMSClientSubscription clientConnection=new JMSClientSubscription(clientId, Utils.generateIdentifier(this.url, pubTopicName, subTopicName), this.session, producer, consumer); this.connections.add(clientConnection); return clientConnection; } @@ -198,7 +198,7 @@ public void onMessage(Message message) { */ @Override public void close() throws Exception { - for(SubscriptionConnection connection: this.connections){ + for(JMSClientSubscription connection: this.connections){ connection.disconnect(); } this.connection.stop(); diff --git a/java/src/main/java/com/kaazing/client/universal/UniversalClient.java b/java/src/main/java/com/kaazing/client/universal/UniversalClient.java index 358efa6..cb36864 100644 --- a/java/src/main/java/com/kaazing/client/universal/UniversalClient.java +++ b/java/src/main/java/com/kaazing/client/universal/UniversalClient.java @@ -15,8 +15,8 @@ public interface UniversalClient extends AutoCloseable{ * @param subTopicName name of subscription topic * @param messageListener callback to receive messages * @param noLocal if true client will not receive its own messages (applicable only when pub and sub points are the same) - * @return connection information + * @return subscription information * @throws ClientException indicates that error occurred */ - public ClientSubscription connect(String pubTopicName, String subTopicName, MessagesListener messageListener, boolean noLocal) throws ClientException; + public ClientSubscription subscribe(String pubTopicName, String subTopicName, MessagesListener messageListener, boolean noLocal) throws ClientException; } \ No newline at end of file diff --git a/java/src/test/java/com/kaazing/client/universal/AmqpUniversalClientTest.java b/java/src/test/java/com/kaazing/client/universal/AmqpUniversalClientTest.java index 39293d3..7be1fd2 100644 --- a/java/src/test/java/com/kaazing/client/universal/AmqpUniversalClientTest.java +++ b/java/src/test/java/com/kaazing/client/universal/AmqpUniversalClientTest.java @@ -45,7 +45,7 @@ public void onException(ClientException exception) { @Test public void testString() throws ClientException, InterruptedException { - ClientSubscription connection = amqpClient.connect("test", "test", new MessagesListener() { + ClientSubscription connection = amqpClient.subscribe("test", "test", new MessagesListener() { @Override public void onMessage(Serializable message) { @@ -64,7 +64,7 @@ public void onMessage(Serializable message) { @Test public void testObject() throws ClientException, InterruptedException { - ClientSubscription connection = amqpClient.connect("test", "test", new MessagesListener() { + ClientSubscription connection = amqpClient.subscribe("test", "test", new MessagesListener() { @Override public void onMessage(Serializable message) { @@ -82,7 +82,7 @@ public void onMessage(Serializable message) { @Test public void testNoLocal() throws ClientException, InterruptedException { - ClientSubscription connection = amqpClient.connect("test", "test", new MessagesListener() { + ClientSubscription connection = amqpClient.subscribe("test", "test", new MessagesListener() { @Override public void onMessage(Serializable message) { diff --git a/java/src/test/java/com/kaazing/client/universal/JMSUniversalClientTest.java b/java/src/test/java/com/kaazing/client/universal/JMSUniversalClientTest.java index 09b61ad..0ef0096 100644 --- a/java/src/test/java/com/kaazing/client/universal/JMSUniversalClientTest.java +++ b/java/src/test/java/com/kaazing/client/universal/JMSUniversalClientTest.java @@ -45,7 +45,7 @@ public void onException(ClientException exception) { @Test public void testString() throws ClientException, InterruptedException { - ClientSubscription connection = jmsClient.connect("test", "test", new MessagesListener() { + ClientSubscription connection = jmsClient.subscribe("test", "test", new MessagesListener() { @Override public void onMessage(Serializable message) { @@ -64,7 +64,7 @@ public void onMessage(Serializable message) { @Test public void testObject() throws ClientException, InterruptedException { - ClientSubscription connection = jmsClient.connect("test", "test", new MessagesListener() { + ClientSubscription connection = jmsClient.subscribe("test", "test", new MessagesListener() { @Override public void onMessage(Serializable message) { @@ -83,7 +83,7 @@ public void onMessage(Serializable message) { @Test public void testNoLocal() throws ClientException, InterruptedException { - ClientSubscription connection = jmsClient.connect("test", "test", new MessagesListener() { + ClientSubscription connection = jmsClient.subscribe("test", "test", new MessagesListener() { @Override public void onMessage(Serializable message) { diff --git a/javascript/JavaScriptClient.md b/javascript/JavaScriptClient.md index 2332c9b..a5274d7 100644 --- a/javascript/JavaScriptClient.md +++ b/javascript/JavaScriptClient.md @@ -1,5 +1,5 @@ # Kaazing JavaScript Universal Client for Javascript -This library is intended to be used with 'plain JavaScript' application; it provides JavaScript function that returns an object that can be used in the client application to interact with Kaazing Gateway. +This library is intended to be used with 'plain JavaScript', AngularJS, ReactJS applications (see [Kaazing JavaScript Starter Applications](https://github.com/kaazing/javascript.getting.started) and [Kaazing Examples and Tutorials](https://github.com/kaazing/tutorials)); it provides JavaScript function that returns an object that can be used in the client application to interact with Kaazing Gateway. ## Using the Library ### Install the library @@ -45,7 +45,7 @@ This library is intended to be used with 'plain JavaScript' application; it prov Where: - **protocol**: Specifies protocol that should be used for communications: jms - for communication with Kaazing JMS Gateway, amqp - for communication with Kaazing AMQP Gateway. -- Establish a connection within your controller +- Establish a connection ```javascript ... @@ -53,120 +53,85 @@ This library is intended to be used with 'plain JavaScript' application; it prov ... $(document).ready(function () { - client.connect(url, username, password, topicP, topicS, noLocal, messageDestinationFuncHandle,loggerFuncHandle); - - ... + client.connect(connectionInfo, // Connection info + onError, // callback function to process errors + function(connection){ + ... + } } ``` Where: - - **url**: Connection URL (e.g. ws://localhost:8001/amqp or ws://localhost:8001/jms) - - **username**: User name to be used to establish connection - - **password**: User password to be used to establish connection - - **topicP**: Name of the publishing endpoint - AMQP exchange used for publishing or JMS Topic - - **topicS**: Name of the subscription endpoint - AMQP exchange used for subscription or JMS Topic - - **noLocal**: Flag indicating whether the client wants to receive its own messages (true) or not (false). That flag should be used when publishing and subscription endpoints are the same. - - **messageDestinationFuncHandle**: Function that will be used to process received messages from subscription endpoint in a format: _function(messageBody)_ - - **errorFuncHandle**: function that is used for error handling in a format of _function(error)_ - - **loggerFuncHandle**: function that is used for logging events in a format of _function(severity, message)_ - - **connectFunctionHandle**: function this is called when connection is established in a format: _function()_ -- Add disconnect on window close (shown method uses JQuery): + - **coonectionInfo**: Connection information that contains _URL_ (e.g. ws://localhost:8001/amqp or ws://localhost:8001/jms), _username_(user name to be used to establish connection) and _password_(user password to be used to establish connection) + - **onError**: function that is used for error handling in a format of _function(error)_. + - _callback function_ to receive a connection object once connection is established. + + **Note:** If you want to add a logger to log library messages, add the following after creating the client: ```javascript - ... - - var client=UniversalClientDef(protocol); - ... - - $(document).ready(function () { - client.connect(url, username, password, topicP, topicS, noLocal, messageDestinationFuncHandle, errorFuncHandle, loggerFuncHandle, connectFunctionHandle); - - ... - $( window ).unload(function() { - // Disconnect - client.disconnect(); - }); - + + var logWebSocketMessage = function (cls, msg) { + ... } - - ``` -- To send messages use sendMessage(msg) method - where _**msg**_ is message to be sent. If _**msg**_ is not a string it will be converted to JSON. Be sure to send the message only after the connection has been successfully initialized (the connectFunctionHandle() callback is an ideal place for it). - ```javascript - ... - var client=UniversalClientDef(protocol); - ... + // Set the logger function + client.loggerFuncHandle=logWebSocketMessage; - var sendMessage=function(msg){ - // Send message - client.sendMessage(msg); - } - - - $(document).ready(function () { - client.connect(url, username, password, topicP, topicS, noLocal, messageDestinationFuncHandle, errorFuncHandle, loggerFuncHandle, connectFunctionHandle); - - ... - $( window ).unload(function() { - // Disconnect - client.disconnect(); - }); - - } ``` -- When message is received, service will call a function registered as **messageDestinationFuncHandle** as shown above. E.g. - +- Subscribe to the topics of interest ```javascript ... var client=UniversalClientDef(protocol); ... - var sendMessage=function(msg){ - // Send message - client.sendMessage(msg); - } - - var processReceivedCommand=function(cmd){ - // Process received message - } - $(document).ready(function () { - client.connect(url, username, password, topicP, topicS, noLocal, processReceivedCommand,errorFuncHandle, loggerFuncHandle, connectFunctionHandle); - - ... - $( window ).unload(function() { - // Disconnect - client.disconnect(); - }); + var subscription; + client.connect(connectionInfo, // Connection info + onError, // callback function to process errors + function(connection){ + connection.subscribe(topicP, // Topic to send message + topicS, // Topic to subscribe to receive messsages + onMessage, // callback function to process received messages + noLocal, // noLocal flag set to false - allow receiving your own messages + function(subscription){ + subscription=subscr; + }); + } + } } - - ``` -- To handle WebSocket errors, specify the function **errorFuncHandle** or pass _null_ if not needed. E.g.: + + ``` + + Where: + - **topicP**: Name of the publishing endpoint - AMQP exchange used for publishing or JMS Topic + - **topicS**: Name of the subscription endpoint - AMQP exchange used for subscription or JMS Topic + - **noLocal**: Flag indicating whether the client wants to receive its own messages (true) or not (false). That flag should be used when publishing and subscription endpoints are the same. + - **onMessage**: Function that will be used to process received messages from subscription endpoint in a format of _function(message)_ + - _callback function_ to receive subscription object + **Note** Multiple subscriptions are allowed within single connection! +- Add disconnect on window close (shown method uses JQuery): ```javascript ... var client=UniversalClientDef(protocol); ... - var sendMessage=function(msg){ - // Send message - client.sendMessage(msg); - } - - var processReceivedCommand=function(cmd){ - // Process received message - } - - var handleWebSocketError = function (error) { - // Habdle WebSocket error - } - $(document).ready(function () { - client.connect(url, username, password, topicP, topicS, noLocal, processReceivedCommand,handleWebSocketError, loggerFuncHandle, connectFunctionHandle); - + var subscription; + client.connect(connectionInfo, // Connection info + onError, // callback function to process errors + function(connection){ + connection.subscribe(topicP, // Topic to send message + topicS, // Topic to subscribe to receive messsages + onMessage, // callback function to process received message + noLocal, // noLocal flag set to false - allow receiving your own messages + function(subscription){ + subscription=subscr; + }); + } + } ... $( window ).unload(function() { // Disconnect @@ -174,45 +139,10 @@ This library is intended to be used with 'plain JavaScript' application; it prov }); } - ``` - -- To log WebSocket related events, specify the function **loggerFuncHandle** or pass null if not needed. E.g.: - ```javascript - ... - - var client=UniversalClientDef(protocol); - ... - - var sendMessage=function(msg){ - // Send message - client.sendMessage(msg); - } - - var processReceivedCommand=function(cmd){ - // Process received message - } - - var handleWebSocketError = function (error) { - // Habdle WebSocket error - } - - var logWebSocketMessage = function (cls, msg) { - // Log WebSocket messages - } - - $(document).ready(function () { - client.connect(url, username, password, topicP, topicS, noLocal, processReceivedCommand,handleWebSocketError, logWebSocketMessage, connectFunctionHandle); - - ... - $( window ).unload(function() { - // Disconnect - client.disconnect(); - }); - } ``` - -- To perform post-connect initalizations, specify the function **connectFunctionHandle** or pass null if not needed. E.g.: +- To send messages use sendMessage(msg) method of a subscription object + where _**msg**_ JavaScript object to be sent (as a JSON string). ```javascript ... @@ -221,29 +151,24 @@ This library is intended to be used with 'plain JavaScript' application; it prov var sendMessage=function(msg){ // Send message - client.sendMessage(msg); - } - - var processReceivedCommand=function(cmd){ - // Process received message - } - - var handleWebSocketError = function (error) { - // Habdle WebSocket error - } - - var logWebSocketMessage = function (cls, msg) { - // Log WebSocket messages - } - - var onWebSocketConnected = function () { - // Do some post-connect initialization + subscrpiption.sendMessage(msg); } $(document).ready(function () { - client.connect(url, username, password, topicP, topicS, noLocal, processReceivedCommand,handleWebSocketError, logWebSocketMessage, onWebSocketConnected); - + var subscription; + client.connect(connectionInfo, // Connection info + onError, // callback function to process errors + function(connection){ + connection.subscribe(topicP, // Topic to send message + topicS, // Topic to subscribe to receive messsages + onMessage, // callback function to process received message + noLocal, // noLocal flag set to false - allow receiving your own messages + function(subscription){ + subscription=subscr; + }); + } + } ... $( window ).unload(function() { // Disconnect @@ -252,6 +177,7 @@ This library is intended to be used with 'plain JavaScript' application; it prov } ``` + ## Organization of Kaazing JavaScript Universal Client ![][image-1] diff --git a/javascript/KaazingJMSClientLibrariesFacade.md b/javascript/KaazingJMSClientLibrariesFacade.md index 90ce881..bc8f7ec 100644 --- a/javascript/KaazingJMSClientLibrariesFacade.md +++ b/javascript/KaazingJMSClientLibrariesFacade.md @@ -1,7 +1,7 @@ # Kaazing Javascript JMS Client Libraries Facade Kaazing JavaScript JMS Client Libraries Facade: * Implements basic publish-subscribe functionality for JMS to help developers in getting started with their JMS WebSocket projects -* Provide developers with the reference implementations for using Kaazing AMQP JavaScript client libraries +* Provide developers with the reference implementations for using Kaazing JMS JavaScript client libraries For more information see: - [Build JavaScript JMS Clients Using Kaazing WebSocket Gateway - JMS Edition](http://developer.kaazing.com/documentation/jms/4.0/dev-js/o_dev_js.html) @@ -9,7 +9,7 @@ For more information see: ## Organization of the library Library consists of jmsClientFunction that creates JMSClient object. JMSClient objects provides the following functionality: -- **connect** function - connects client to Kaazing WebSocket JMS gateway, creates publishing endpoint and subscribes to a subscription endpoint +- **connect** function - connects client to Kaazing WebSocket JMS gateway and creates a __connection__ object - **disconnect** function - disconnects client from Kaazing WebSocket JMS gateway - **sendMessage** function - sends the message to a publishing endpoint diff --git a/javascript/README.md b/javascript/README.md index 3bf6169..47a40e9 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -1,7 +1,7 @@ # Universal Clients for JavaScript Applications The [Kaazing JavaScript WebSocket Universal Clients][2] library that can be also used with AngularJS, ReactJS and so on. -Both implementation use the same underlying [JavaScript AMQP Client Libraries Facade][3] and [JavaScript JMS Client Libraries Facade][4] scripts for interaction with Kaazing AMQP and JMS client libraries. +The library uses [JavaScript AMQP Client Libraries Facade][3] and [JavaScript JMS Client Libraries Facade][4] scripts for interaction with Kaazing AMQP and JMS client libraries. Please, refer to the links above for the details about the details of the usage and implementations. ## Using the Client Libraries diff --git a/javascript/src/AmqpUniversalClient.js b/javascript/src/AmqpUniversalClient.js index fdca848..638d1f8 100644 --- a/javascript/src/AmqpUniversalClient.js +++ b/javascript/src/AmqpUniversalClient.js @@ -286,7 +286,7 @@ var amqpClientFunction=function(logInformation){ /** * Disconnects from Kaazing WebSocket AMQP Gateway */ - AmqpClient.disconnect=function(){ + AmqpClient.close=function(){ amqpClient.disconnect(); } diff --git a/javascript/src/JMSUniversalClient.js b/javascript/src/JMSUniversalClient.js index 9b6984c..a8d9420 100644 --- a/javascript/src/JMSUniversalClient.js +++ b/javascript/src/JMSUniversalClient.js @@ -91,7 +91,7 @@ var jmsClientFunction=function(logInformation){ /** * Closes the subscrpiption and releases all the resources. */ - close:function(){ + disconnect:function(){ if (this.subscribed){ this.closed.resolve(); } @@ -216,7 +216,7 @@ var jmsClientFunction=function(logInformation){ /** * Disconnects from Kaazing WebSocket JMS Gateway, closes all the subscription and releases all the resources. */ - JMSClient.disconnect=function(){ + JMSClient.close=function(){ for(var i=0;i