org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint

## Class SuperTenantSubscriptionEndpoint

- java.lang.Object
- - org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint.SubscriptionEndpoint
  - - org.wso2.carbon.device.mgt.output.adapter.websocket.endpoint.SuperTenantSubscriptionEndpoint

-     public class SuperTenantSubscriptionEndpoint
      extends SubscriptionEndpoint

  Connect to web socket with Super tenant

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SuperTenantSubscriptionEndpoint()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onClose(javax.websocket.Session session, javax.websocket.CloseReason reason, String streamName, String version)` Web socket onClose - Remove the registered sessions
    `void` | `onError(javax.websocket.Session session, Throwable throwable, String streamName, String version)` Web socket onError - Remove the registered sessions
    `void` | `onMessage(javax.websocket.Session session, String message, String streamName)` Web socket onMessage - When client sens a message
    `void` | `onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config, String streamName, String version)` Web socket onOpen - When client sends a message

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SuperTenantSubscriptionEndpoint

          public SuperTenantSubscriptionEndpoint()

  - ### Method Detail

    - #### onOpen

          public void onOpen(javax.websocket.Session session,
                    javax.websocket.EndpointConfig config,
                    String streamName,
                    String version)

      Web socket onOpen - When client sends a message
      Parameters:
        `session` - - Users registered session.
        `streamName` - - StreamName extracted from the ws url.
        `version` - - Version extracted from the ws url.

    - #### onMessage

          public void onMessage(javax.websocket.Session session,
                       String message,
                       String streamName)

      Web socket onMessage - When client sens a message
      Parameters:
        `session` - - Users registered session.
        `message` - - Status code for web-socket close.
        `streamName` - - StreamName extracted from the ws url.

    - #### onClose

          public void onClose(javax.websocket.Session session,
                     javax.websocket.CloseReason reason,
                     String streamName,
                     String version)

      Web socket onClose - Remove the registered sessions
      Overrides:
        `onClose` in class `SubscriptionEndpoint`
      Parameters:
        `session` - - Users registered session.
        `reason` - - Status code for web-socket close.
        `streamName` - - StreamName extracted from the ws url.
        `version` - - Version extracted from the ws url.

    - #### onError

          public void onError(javax.websocket.Session session,
                     Throwable throwable,
                     String streamName,
                     String version)

      Web socket onError - Remove the registered sessions
      Overrides:
        `onError` in class `SubscriptionEndpoint`
      Parameters:
        `session` - - Users registered session.
        `throwable` - - Status code for web-socket close.
        `streamName` - - StreamName extracted from the ws url.
        `version` - - Version extracted from the ws url.

Copyright © 2017 WSO2. All rights reserved.