unsubscribe from all resources of the stasis application @throws ARIException when error
()
| 240 | * @throws ARIException when error |
| 241 | */ |
| 242 | private void unsubscribeApplication() throws ARIException { |
| 243 | Application application = applications().get(appName).execute(); |
| 244 | // unsubscribe from all channels |
| 245 | for (int i = 0; i < application.getChannel_ids().size(); i++) { |
| 246 | applications().unsubscribe(appName, "channel:" + application.getChannel_ids().get(i)).execute(); |
| 247 | } |
| 248 | // unsubscribe from all bridges |
| 249 | for (int i = 0; i < application.getBridge_ids().size(); i++) { |
| 250 | applications().unsubscribe(appName, "bridge:" + application.getBridge_ids().get(i)).execute(); |
| 251 | } |
| 252 | // unsubscribe from all endpoints |
| 253 | for (int i = 0; i < application.getEndpoint_ids().size(); i++) { |
| 254 | applications().unsubscribe(appName, "endpoint:" + application.getEndpoint_ids().get(i)).execute(); |
| 255 | } |
| 256 | // unsubscribe from all deviceState |
| 257 | for (int i = 0; i < application.getDevice_names().size(); i++) { |
| 258 | applications().unsubscribe(appName, "deviceState:" + application.getDevice_names().get(i)).execute(); |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | /** |
| 263 | * Create the events Websocket with the provided callback |
no test coverage detected