Class Session

java.lang.Object
org.red5.server.session.Session
All Implemented Interfaces:
Serializable, ISession

public class Session extends Object implements ISession
Represents the most basic type of "Session", loosely modeled after the HTTP Session used in J2EE applications.
Author:
The Red5 Project, Paul Gregoire (mondain@gmail.com)
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • created

      protected long created
    • active

      protected boolean active
    • sessionId

      protected String sessionId
    • destinationDirectory

      protected String destinationDirectory
    • clientId

      protected String clientId
  • Constructor Details

    • Session

      public Session()
    • Session

      public Session(String sessionId)
  • Method Details

    • getCreated

      public long getCreated()
      Description copied from interface: ISession
      Returns creation time in milliseconds.
      Specified by:
      getCreated in interface ISession
      Returns:
      creation time
    • getSessionId

      public String getSessionId()
      Description copied from interface: ISession
      Returns the session's identifier.
      Specified by:
      getSessionId in interface ISession
      Returns:
      session id
    • reset

      public void reset()
      Description copied from interface: ISession
      Resets a specified set of internal parameters.
      Specified by:
      reset in interface ISession
    • isActive

      public boolean isActive()
      Description copied from interface: ISession
      Returns the active state of the session.
      Specified by:
      isActive in interface ISession
      Returns:
      is active
    • end

      public void end()
      Description copied from interface: ISession
      Ends the session, no further modifications should be allowed.
      Specified by:
      end in interface ISession
    • getClientId

      public String getClientId()
      Description copied from interface: ISession
      Returns the client id associated with this session.
      Specified by:
      getClientId in interface ISession
      Returns:
      client id
    • setClientId

      public void setClientId(String clientId)
      Description copied from interface: ISession
      Sets the associated client id.
      Specified by:
      setClientId in interface ISession
      Parameters:
      clientId - client id
    • setDestinationDirectory

      public void setDestinationDirectory(String destinationDirectory)
      Description copied from interface: ISession
      Sets where session resources will be located if persisted to disk.
      Specified by:
      setDestinationDirectory in interface ISession
      Parameters:
      destinationDirectory - destination directory
    • getDestinationDirectory

      public String getDestinationDirectory()
      Description copied from interface: ISession
      Returns the directory used to store session resources.
      Specified by:
      getDestinationDirectory in interface ISession
      Returns:
      destination directory
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object