org.red5.server.session
Class Session

java.lang.Object
  extended by 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 ([email protected]), Paul Gregoire ([email protected])
See Also:
Serialized Form

Field Summary
protected  boolean active
           
protected  String clientId
           
protected  long created
           
protected  String destinationDirectory
           
protected  String sessionId
           
 
Constructor Summary
Session()
           
Session(String sessionId)
           
 
Method Summary
 void end()
          Ends the session, no further modifications should be allowed.
 boolean equals(Object obj)
           
 String getClientId()
          Returns the client id associated with this session.
 long getCreated()
          Returns creation time in milliseconds.
 String getDestinationDirectory()
          Returns the directory used to store session resources.
 String getSessionId()
          Returns the session's identifier.
 int hashCode()
           
 boolean isActive()
          Returns the active state of the session.
 void reset()
          Resets a specified set of internal parameters.
 void setClientId(String clientId)
          Sets the associated client id.
 void setDestinationDirectory(String destinationDirectory)
          Sets where session resources will be located if persisted to disk.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

created

protected long created

active

protected boolean active

sessionId

protected String sessionId

destinationDirectory

protected String destinationDirectory

clientId

protected String clientId
Constructor Detail

Session

public Session()

Session

public Session(String sessionId)
Method Detail

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


Copyright © 2006-2012 The Red5 Project