Class SubscriptionRequest
- java.lang.Object
-
- ch.colabproject.colab.api.controller.SubscriptionRequest
-
- All Implemented Interfaces:
Serializable
public class SubscriptionRequest extends Object implements Serializable
Subscription request to be propagated through the cluster to reach the instance which is responsible for the given wsSessionId- Author:
- maxence
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubscriptionRequest.ChannelType
One-to-one mapping to EffectiveChannelsstatic class
SubscriptionRequest.SubscriptionType
Subscript or unsubscribe
-
Constructor Summary
Constructors Constructor Description SubscriptionRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubscriptionRequest
build(SubscriptionRequest.SubscriptionType type, SubscriptionRequest.ChannelType channelType, Long channelId, String wsSessionId, Long httpSessionId)
Build a request messageLong
getChannelId()
Get id channelSubscriptionRequest.ChannelType
getChannelType()
get channel type.Long
getColabSessionId()
Get http session idSubscriptionRequest.SubscriptionType
getType()
Get the type of requestString
getWsSessionId()
Get the ws session idvoid
setChannelId(Long channelId)
Set id of the channelvoid
setChannelType(SubscriptionRequest.ChannelType channelType)
Set the type of channelvoid
setColabSessionId(Long colabSessionId)
Set HTTP session idvoid
setType(SubscriptionRequest.SubscriptionType type)
Set type of requestvoid
setWsSessionId(String wsSessionId)
Set the websocket session idString
toString()
-
-
-
Method Detail
-
getType
public SubscriptionRequest.SubscriptionType getType()
Get the type of request- Returns:
- request type
-
setType
public void setType(SubscriptionRequest.SubscriptionType type)
Set type of request- Parameters:
type
- subscript or unsubscribe
-
getWsSessionId
public String getWsSessionId()
Get the ws session id- Returns:
- the ws session id
-
setWsSessionId
public void setWsSessionId(String wsSessionId)
Set the websocket session id- Parameters:
wsSessionId
- ws session id
-
getColabSessionId
public Long getColabSessionId()
Get http session id- Returns:
- http session id
-
setColabSessionId
public void setColabSessionId(Long colabSessionId)
Set HTTP session id- Parameters:
colabSessionId
- id of the HTTP session
-
getChannelType
public SubscriptionRequest.ChannelType getChannelType()
get channel type.- Returns:
- the type
-
setChannelType
public void setChannelType(SubscriptionRequest.ChannelType channelType)
Set the type of channel- Parameters:
channelType
- new channel type
-
getChannelId
public Long getChannelId()
Get id channel- Returns:
- id of the channel
-
setChannelId
public void setChannelId(Long channelId)
Set id of the channel- Parameters:
channelId
- new id
-
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
-
-