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:
  • Constructor Details

    • SubscriptionRequest

      public SubscriptionRequest()
  • Method Details

    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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 request
      channelType - channel type
      channelId - channel id
      wsSessionId - ws id
      httpSessionId - http id
      Returns:
      the request