public abstract class SrvSession extends Object
Base class for server session implementations for different protocols.
Constructor and Description |
---|
SrvSession(int sessId,
NetworkServer srv,
String proto,
String remoteName)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addDynamicShare(SharedDevice shrDev)
Add a dynamic share to the list of shares created for this session
|
void |
clearTransaction()
Clear the stored transaction
|
void |
closeSession()
Close the network session
|
void |
debugPrint(String str)
Output a string to the debug device
|
void |
debugPrintln(Exception ex)
Output an exception stack trace to the debug device
|
void |
debugPrintln(String str)
Output a string and a newline to the debug device
|
void |
endTransaction()
End a transaction
|
AuthContext |
getAuthenticationContext()
Return the authentication context for this sesion
|
ClientInfo |
getClientInformation()
Return the client information
|
Object |
getDriverState()
Get the Driver State.
|
SharedDeviceList |
getDynamicShareList()
Return the list of dynamic shares created for this session
|
long |
getLastIOTime()
Return the time of the last I/o on this session
|
RequestPostProcessor |
getNextPostProcessor()
Return the post processor at the head of the queue, or null if there are no more post processors
queued.
|
int |
getProcessId()
Return the process id
|
String |
getProtocolName()
Return the protocol name
|
abstract InetAddress |
getRemoteAddress()
Return the remote client network address
|
String |
getRemoteName()
Return the remote client name
|
NetworkServer |
getServer()
Return the server this session is associated with
|
int |
getSessionId()
Return the session id for this session.
|
ThreadLocal<Object> |
getTransactionObject()
Return the transaction context
|
String |
getUniqueId()
Return the unique session id
|
boolean |
hasAuthenticationContext()
Check if the session has an authentication context
|
boolean |
hasClientInformation()
Check if the session has valid client information
|
boolean |
hasDebug(int dbgFlag)
Determine if the specified debug flag is enabled.
|
boolean |
hasDynamicShares()
Determine if the session has any dynamic shares
|
boolean |
hasPostProcessorRequests()
Check if there are post processor requests queued
|
boolean |
hasProtocolName()
Determine if the protocol type has been set
|
boolean |
hasRemoteName()
Determine if the remote client name has been set
|
boolean |
hasTransaction()
Check if there is an active transaction
|
void |
initializeTransactionObject()
Initialize the thread local transaction objects
|
boolean |
isLoggedOn()
Determine if the session is logged on/validated
|
boolean |
isPseudoFilesEnabled()
Are pseudo files enabled for this session?
|
boolean |
isShutdown()
Determine if the session has been shut down
|
void |
setAuthenticationContext(AuthContext ctx)
Set the authentication context, used during the initial session setup phase
|
void |
setClientInformation(ClientInfo client)
Set the client information
|
void |
setDebug(int flgs)
Set the debug output interface.
|
void |
setDebugPrefix(String prefix)
Set the debug output prefix for this session
|
void |
setDriverState(Object driverState)
Set the Driver State.
|
void |
setLastIOTime(long ioTime)
Set the time of hte last I/O on this session
|
void |
setLoggedOn(boolean loggedOn)
Set the logged on/validated status for the session
|
void |
setProcessId(int id)
Set the process id
|
void |
setProtocolName(String name)
Set the protocol name
|
void |
setRemoteName(String name)
Set the remote client name
|
void |
setSessionId(int id)
Set the session id for this session.
|
protected void |
setShutdown(boolean flg)
Set the shutdown flag
|
void |
setTransaction(Object tx,
TransactionalFilesystemInterface txIface)
Set the active transaction and transaction interface
|
void |
setTransaction(TransactionalFilesystemInterface txIface)
Set the active transaction interface
|
void |
setUniqueId(String unid)
Set the unique session id
|
String |
toString()
Set the Driver State.
|
abstract boolean |
useCaseSensitiveSearch()
Determine if the protocol uses case sensitive filesystem searches
|
public SrvSession(int sessId, NetworkServer srv, String proto, String remoteName)
sessId
- intsrv
- NetworkServerproto
- StringremoteName
- Stringpublic final void debugPrint(String str)
str
- Stringpublic final void debugPrintln(String str)
str
- Stringpublic final void debugPrintln(Exception ex)
ex
- Exceptionpublic final boolean hasAuthenticationContext()
public final AuthContext getAuthenticationContext()
public final void addDynamicShare(SharedDevice shrDev)
shrDev
- SharedDevicepublic final boolean hasDynamicShares()
public final SharedDeviceList getDynamicShareList()
public final int getProcessId()
public abstract InetAddress getRemoteAddress()
public final int getSessionId()
public final NetworkServer getServer()
public final boolean hasClientInformation()
public final ClientInfo getClientInformation()
public final boolean hasProtocolName()
public final String getProtocolName()
public final boolean hasRemoteName()
public final String getRemoteName()
public final boolean isLoggedOn()
public final boolean isShutdown()
public final String getUniqueId()
public final boolean hasDebug(int dbgFlag)
dbgFlag
- intpublic final long getLastIOTime()
public final boolean hasPostProcessorRequests()
public final RequestPostProcessor getNextPostProcessor()
public abstract boolean useCaseSensitiveSearch()
public final void setAuthenticationContext(AuthContext ctx)
ctx
- AuthContextpublic final void setClientInformation(ClientInfo client)
client
- ClientInfopublic final void setDebug(int flgs)
flgs
- intpublic final void setDebugPrefix(String prefix)
prefix
- Stringpublic final void setLoggedOn(boolean loggedOn)
loggedOn
- booleanpublic final void setProcessId(int id)
id
- intpublic final void setProtocolName(String name)
name
- Stringpublic final void setRemoteName(String name)
name
- Stringpublic final void setSessionId(int id)
id
- intpublic final void setUniqueId(String unid)
unid
- Stringpublic final void setLastIOTime(long ioTime)
ioTime
- longprotected final void setShutdown(boolean flg)
flg
- booleanpublic void closeSession()
public final void initializeTransactionObject()
public final ThreadLocal<Object> getTransactionObject()
public final void setTransaction(Object tx, TransactionalFilesystemInterface txIface)
tx
- ObjecttxIface
- TransactionalFilesystemInterfacepublic final void setTransaction(TransactionalFilesystemInterface txIface)
txIface
- TransactionalFilesystemInterfacepublic final void clearTransaction()
public final void endTransaction()
public final boolean hasTransaction()
public boolean isPseudoFilesEnabled()
public Object getDriverState()
public void setDriverState(Object driverState)
driverState
- ObjectCopyright © 2005–2018 Alfresco Software. All rights reserved.