org.modeshape.jboss.managed
Class ManagedSession

java.lang.Object
  extended by org.modeshape.jboss.managed.ManagedSession
All Implemented Interfaces:
ModeShapeManagedObject

@Immutable
public final class ManagedSession
extends Object
implements ModeShapeManagedObject

The ManagedSession class is a JBoss managed object of a ModeShape session.


Field Summary
static Comparator<ManagedSession> SORT_BY_USER
          A sorter for when sessions need to be sorted by user name.
 
Constructor Summary
ManagedSession(String workspaceName, String userName, String id, org.joda.time.DateTime timeCreated)
          Constructs a managed object for a ModeShape session.
 
Method Summary
 String getId()
          Obtains the session's unique identifier.
 org.joda.time.DateTime getTimeCreated()
          Obtains the session's creation time.
 String getUserName()
          Obtains the session's user name.
 String getWorkspaceName()
          Obtains the session's workspace name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SORT_BY_USER

public static final Comparator<ManagedSession> SORT_BY_USER
A sorter for when sessions need to be sorted by user name.

Constructor Detail

ManagedSession

public ManagedSession(String workspaceName,
                      String userName,
                      String id,
                      org.joda.time.DateTime timeCreated)
Constructs a managed object for a ModeShape session.

Parameters:
workspaceName - the session's workspace name (never null and never empty)
userName - the user name of the session (never null and never empty)
id - the session's identifier (never null and never empty)
timeCreated - the session's time of creation (never null)
Method Detail

getId

public String getId()
Obtains the session's unique identifier. This is a JBoss managed readonly property.

Returns:
the identifier of this session (never null and never empty)

getTimeCreated

public org.joda.time.DateTime getTimeCreated()
Obtains the session's creation time. This is a JBoss managed readonly property.

Returns:
the time this session was created (never null)

getUserName

public String getUserName()
Obtains the session's user name. This is a JBoss managed readonly property.

Returns:
the user name of this session (never null and never empty)

getWorkspaceName

public String getWorkspaceName()
Obtains the session's workspace name. This is a JBoss managed readonly property.

Returns:
the workspace name of this session (never null and never empty)


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.