Class SubscriptionRequest
java.lang.Object
ch.colabproject.colab.api.controller.SubscriptionRequest
- All Implemented Interfaces:
Serializable
Subscription request to be propagated through the cluster to reach the instance which is
responsible for the given wsSessionId
- Author:
- maxence
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumOne-to-one mapping to EffectiveChannelsstatic enumSubscript or unsubscribe -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SubscriptionRequestbuild(SubscriptionRequest.SubscriptionType type, SubscriptionRequest.ChannelType channelType, Long channelId, String wsSessionId, Long httpSessionId) Build a request messageGet id channelget channel type.Get http session idgetType()Get the type of requestGet the ws session idvoidsetChannelId(Long channelId) Set id of the channelvoidsetChannelType(SubscriptionRequest.ChannelType channelType) Set the type of channelvoidsetColabSessionId(Long colabSessionId) Set HTTP session idvoidSet type of requestvoidsetWsSessionId(String wsSessionId) Set the websocket session idtoString()
-
Constructor Details
-
SubscriptionRequest
public SubscriptionRequest()
-
-
Method Details
-
getType
Get the type of request- Returns:
- request type
-
setType
Set type of request- Parameters:
type- subscript or unsubscribe
-
getWsSessionId
Get the ws session id- Returns:
- the ws session id
-
setWsSessionId
Set the websocket session id- Parameters:
wsSessionId- ws session id
-
getColabSessionId
Get http session id- Returns:
- http session id
-
setColabSessionId
Set HTTP session id- Parameters:
colabSessionId- id of the HTTP session
-
getChannelType
get channel type.- Returns:
- the type
-
setChannelType
Set the type of channel- Parameters:
channelType- new channel type
-
getChannelId
Get id channel- Returns:
- id of the channel
-
setChannelId
Set id of the channel- Parameters:
channelId- new id
-
toString
-
build
public static SubscriptionRequest build(SubscriptionRequest.SubscriptionType type, SubscriptionRequest.ChannelType channelType, Long channelId, String wsSessionId, Long httpSessionId) Build a request message- Parameters:
type- type of the requestchannelType- channel typechannelId- channel idwsSessionId- ws idhttpSessionId- http id- Returns:
- the request
-