Package org.hippoecm.hst.core.jcr.pool
Interface PooledSession
-
- All Superinterfaces:
HippoSession
,javax.jcr.Session
public interface PooledSession extends HippoSession
PooledSession interface. This interface extendsHippoSession
, allowing to set additional attributes for internal use. For example, if a pooled session is needed to refresh just before borrowing from the pool, the pool implementation can set a specific attribute to check it later.Note: If a pooled session is already returned to the pool, then any method invocation on this pooled session will throw
java.lang.IllegalStateException
.- Version:
- $Id$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
activate()
Marks this pooled session as activated.String
getUserID()
Gets the user ID that was used to acquire this session.long
lastRefreshed()
Returns the last refreshed time millis.void
logoutSession()
Invokes logout() of the underlying session.void
passivate()
Marks this pooled session as passivated.long
timeCreated()
Returns the Session creation time millis.-
Methods inherited from interface org.hippoecm.repository.api.HippoSession
copy, createSecurityDelegate, disableVirtualLayers, exportDereferencedView, exportDereferencedView, exportEnhancedSystemViewPackage, getSessionClassLoader, getUser, getWorkspace, getXAResource, importEnhancedSystemViewXML, isSystemSession, isUserInRole, localRefresh, pendingChanges, pendingChanges, pendingChanges
-
Methods inherited from interface javax.jcr.Session
addLockToken, checkPermission, exportDocumentView, exportDocumentView, exportSystemView, exportSystemView, getAccessControlManager, getAttribute, getAttributeNames, getImportContentHandler, getItem, getLockTokens, getNamespacePrefix, getNamespacePrefixes, getNamespaceURI, getNode, getNodeByIdentifier, getNodeByUUID, getProperty, getRepository, getRetentionManager, getRootNode, getValueFactory, hasCapability, hasPendingChanges, hasPermission, impersonate, importXML, isLive, itemExists, logout, move, nodeExists, propertyExists, refresh, removeItem, removeLockToken, save, setNamespacePrefix
-
-
-
-
Method Detail
-
activate
void activate()
Marks this pooled session as activated.
-
passivate
void passivate()
Marks this pooled session as passivated.
-
logoutSession
void logoutSession() throws javax.jcr.RepositoryException
Invokes logout() of the underlying session.- Throws:
javax.jcr.RepositoryException
-
lastRefreshed
long lastRefreshed()
Returns the last refreshed time millis.- Returns:
- the last refreshed time millis.
-
timeCreated
long timeCreated()
Returns the Session creation time millis.
-
getUserID
String getUserID()
Gets the user ID that was used to acquire this session. This method is free to return an "anonymous user id" ornull
if theCredentials
used to acquire this session happens not to have provided a real user ID (for example, if instead ofSimpleCredentials
some other implementation ofCredentials
was used).- Specified by:
getUserID
in interfacejavax.jcr.Session
- Returns:
- the user id from the credentials used to acquire this session.
-
-