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 classSubscriptionRequest.ChannelTypeOne-to-one mapping to EffectiveChannelsstatic classSubscriptionRequest.SubscriptionTypeSubscript or unsubscribe
-
Constructor Summary
Constructors Constructor Description SubscriptionRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubscriptionRequestbuild(SubscriptionRequest.SubscriptionType type, SubscriptionRequest.ChannelType channelType, Long channelId, String wsSessionId, Long httpSessionId)Build a request messageLonggetChannelId()Get id channelSubscriptionRequest.ChannelTypegetChannelType()get channel type.LonggetColabSessionId()Get http session idSubscriptionRequest.SubscriptionTypegetType()Get the type of requestStringgetWsSessionId()Get the ws session idvoidsetChannelId(Long channelId)Set id of the channelvoidsetChannelType(SubscriptionRequest.ChannelType channelType)Set the type of channelvoidsetColabSessionId(Long colabSessionId)Set HTTP session idvoidsetType(SubscriptionRequest.SubscriptionType type)Set type of requestvoidsetWsSessionId(String wsSessionId)Set the websocket session idStringtoString()
-
-
-
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
-
-