org.filesys.server.SrvSession Maven / Gradle / Ivy
Show all versions of jfileserver Show documentation
/*
* Copyright (C) 2006-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see .
*/
package org.filesys.server;
import java.net.InetAddress;
import java.util.EnumSet;
import org.filesys.debug.Debug;
import org.filesys.server.auth.AuthContext;
import org.filesys.server.auth.ClientInfo;
import org.filesys.server.core.SharedDevice;
import org.filesys.server.core.SharedDeviceList;
import org.filesys.server.filesys.TransactionalFilesystemInterface;
/**
* Server Session Base Class
*
*
* Base class for server session implementations for different protocols.
*
* @author gkspencer
*/
public abstract class SrvSession > {
// Network server this session is associated with
private NetworkServer m_server;
// Session id/slot number
private int m_sessId;
// Unique session id string
private String m_uniqueId;
// Process id
private int m_processId = -1;
// Session/user is logged on/validated
private boolean m_loggedOn;
// Indicate if this is a persistent session that will survive passed a socket disconnection
private boolean m_persistentSess;
// Time the session was disconnected
private long m_disconnectTime;
// Client details
private static ThreadLocal m_clientInfo = new ThreadLocal();
// Authentication context, used during the initial session setup phase
private AuthContext m_authContext;
// Debug flags for this session, and debug output interface.
private EnumSet m_debug;
private String m_dbgPrefix;
// List of dynamic/temporary shares created for this session
private SharedDeviceList m_dynamicShares;
// Session shutdown flag
private boolean m_shutdown;
// Protocol type
private String m_protocol;
// Remote client/host name
private String m_remoteName;
// Transaction object, for filesystems that implement the TransactionalFilesystemInterface
private static ThreadLocal