HTTP.WebSocket.closeConnection()

Signature

void closeConnection(Object eventOrSessionContext, int closeCode, String closeReason, boolean all)

Domain

ACTION, CONDITION, BUI

Description

Closes single/all websocket connection/s to the underlying endpoint

Parameters

NameTypeDescription
eventOrSessionContextObjectAccepts a SimpleEvent associated to WebSocket destination or the underlying websocket session context retrieved via getSessionContext api.
closeCodeintValid Websocket close code for closure.Few valid codes are 1001,1002,1003.
closeReasonStringReason for the websocket close connection
allbooleanCloses the current or all websocket connections associated to the underlying endpoint

Returns

TypeDescription
void