MOB-651: Decouple File Servers from Config Service and Authenticators

- Minor JLAN changes (backward compatible)
   - CIFSAuthenticator implements an interface (to allow dynamic proxying to authentication subsystem)
   - CIFSAuthenticator accesses ServerConfiguration via ServerConfigurationAccessor interface and doesn't retain references to config sections (again to allow dynamic proxying and hot swapping)
   - ConfigSections have way of directly setting container initialised authenticators, sharemappers, etc.
   - Authenticators, etc. still support initialisation from config service in backward compatible manner.
- Most of ServerConfigurationBean moved to AbstractServerConfigurationBean superclass.
- New org.alfresco.filesys.config package with ServerConfigurationBean implementation and supporting classes that can be initialised by a Spring container.
- File server authenticators moved into authentication subsystem. TODO: Kerberos and NTLM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13795 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-04-01 13:22:06 +00:00
parent e7d9ce8fc6
commit 972dd9a4ba
49 changed files with 9469 additions and 3276 deletions

View File

@@ -27,14 +27,16 @@ package org.alfresco.filesys;
import java.io.IOException;
import java.io.PrintStream;
import java.net.SocketException;
import java.util.Vector;
import java.util.LinkedList;
import java.util.List;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.jlan.netbios.server.NetBIOSNameServer;
import org.alfresco.jlan.server.NetworkServer;
import org.alfresco.jlan.server.SessionListener;
import org.alfresco.jlan.server.config.ServerConfiguration;
import org.alfresco.jlan.smb.server.CIFSConfigSection;
import org.alfresco.jlan.smb.server.SMBServer;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.util.AbstractLifecycleBean;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -60,7 +62,8 @@ public class CIFSServerBean extends AbstractLifecycleBean
// List of CIFS server components
private Vector<NetworkServer> serverList = new Vector<NetworkServer>();
private List<NetworkServer> serverList = new LinkedList<NetworkServer>();
private List<SessionListener> sessionListeners = new LinkedList<SessionListener>();
/**
* Class constructor
@@ -72,6 +75,11 @@ public class CIFSServerBean extends AbstractLifecycleBean
m_filesysConfig = serverConfig;
}
public void setSessionListeners(List<SessionListener> sessionListeners)
{
this.sessionListeners = sessionListeners;
}
/**
* Return the server configuration
*
@@ -112,8 +120,16 @@ public class CIFSServerBean extends AbstractLifecycleBean
serverList.add(new NetBIOSNameServer(m_filesysConfig));
// Create the SMB server
serverList.add(new SMBServer(m_filesysConfig));
SMBServer smbServer = new SMBServer(m_filesysConfig);
serverList.add(smbServer);
// Install any SMB server listeners so they receive callbacks when sessions are
// opened/closed on the SMB server (e.g. for Authenticators)
for (SessionListener sessionListener : this.sessionListeners)
{
smbServer.addSessionListener(sessionListener);
}
// Add the servers to the configuration