Class CMSessionInfo

java.lang.Object
kr.ac.konkuk.ccslab.cm.entity.CMSessionInfo
Direct Known Subclasses:
CMSession

public class CMSessionInfo extends Object
This class represents information of a session.

The session information is the session name, the session address and port number, and the current number of session members. The session name is the identifier of the session that is managed by a CM server that can be accessed by the session address and port number.

  • Field Details

    • m_strSessionName

      protected String m_strSessionName
    • m_strAddress

      protected String m_strAddress
    • m_nPort

      protected int m_nPort
    • m_nUserNum

      protected int m_nUserNum
  • Constructor Details

    • CMSessionInfo

      public CMSessionInfo()
      Creates an empty CMSessionInfo object.
    • CMSessionInfo

      public CMSessionInfo(String sname, String address, int port)
      Creates a CMSessionInfo object with the session name, the session address and the port number.
      Parameters:
      sname - - the session name
      address - - the session address (The IP address of a CM server that manages the session.)
      port - - the session port number (The port number of a CM server that manages the session.)
    • CMSessionInfo

      public CMSessionInfo(String sname, String address, int port, int nUserNum)
      Creates a CMSessionInfo object with the session name, the session address and the port number, and the number of session members.
      Parameters:
      sname - - the session name
      address - - the session address (The IP address of a CM server that manages the session.)
      port - - the session port number (The port number of a CM server that manages the session.)
      nUserNum - - the current number of users who belong to the session.
  • Method Details

    • setSessionName

      public void setSessionName(String name)
      Sets the session name.
      Parameters:
      name - - the session name
    • setAddress

      public void setAddress(String addr)
      Sets the session address.
      Parameters:
      addr - - the session address (The IP address of a CM server that manages the session.)
    • setPort

      public void setPort(int port)
      Sets the session port number.
      Parameters:
      port - - the session port number (The port number of a CM server that manages the session.)
    • setUserNum

      public void setUserNum(int num)
      Sets the current number of session members.
      Parameters:
      num - - the current number of users who belong to the session.
    • getSessionName

      public String getSessionName()
      Gets the session name.
      Returns:
      - the session name, or an empty string if the session name is not available.
    • getAddress

      public String getAddress()
      Gets the session address.
      Returns:
      - the session address, or an empty string if the session address is not available.
    • getPort

      public int getPort()
      Gets the session port number.
      Returns:
      - the session port number, or -1 if the port number is not available.
    • getUserNum

      public int getUserNum()
      Gets the current number of session members.
      Returns:
      - the current number of session members, or -1 if the current number is not available.