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

## Class SubscriptionEndpoint

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

- Direct Known Subclasses:
    SuperTenantSubscriptionEndpoint, TenantSubscriptionEndpoint

      public class SubscriptionEndpoint
      extends Object

  Interface for subscription and un-subscription for web socket

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubscriptionEndpoint()`

  - ### 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

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

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

- - ### Constructor Detail

    - #### SubscriptionEndpoint

          public SubscriptionEndpoint()

  - ### Method Detail

    - #### onClose

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

      Web socket onClose - Remove the registered sessions
      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
      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.