public class SMBServer extends NetworkFileServer implements Runnable, ConfigurationListener
Modifier and Type | Field and Description |
---|---|
static int |
CIFSNetBIOSNamesAdded |
SHUTDOWN_TIMEOUT
StsAccepted, StsIgnored, StsNewSessionsOnly, StsRestartRequired
Constructor and Description |
---|
SMBServer(ServerConfiguration cfg)
Create an SMB server using the specified configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
addSession(SMBSrvSession sess)
Add a new session to the server
|
protected void |
checkReadOnly(SharedDevice shr)
Check if the disk share is read-only.
|
int |
configurationChanged(int id,
ServerConfiguration config,
Object newVal)
Validate configuration changes that are relevant to the SMB server
|
void |
deleteTemporaryShares(SMBSrvSession sess)
Delete temporary shares created by the share mapper for the specified session
|
void |
fireNetBIOSNamesAddedEvent(int lana)
Send a NetBIOS names added event to server listeners
|
ICifsAuthenticator |
getCifsAuthenticator()
Return the CIFS authenticator
|
CIFSConfigSection |
getCIFSConfiguration()
Return the CIFS server configuration
|
String |
getComment()
Return the server comment.
|
CIFSPacketPool |
getPacketPool()
Return the CIFS packet pool
|
UUID |
getServerGUID()
Return the server GUID
|
String |
getServerName()
Return the CIFS server name
|
int |
getServerType()
Return the server type flags.
|
int |
getSessionDebug()
Return the per session debug flag settings.
|
SrvSessionList |
getSessions()
Return the active session list
|
DialectSelector |
getSMBDialects()
Return the list of SMB dialects that this server supports.
|
ThreadRequestPool |
getThreadPool()
Return the thread pool
|
void |
run()
Start the SMB server.
|
protected void |
sessionClosed(SMBSrvSession sess)
Notify the server that a session has been closed.
|
protected void |
sessionLoggedOn(SMBSrvSession sess)
Notify the server that a user has logged on.
|
protected void |
sessionOpened(SMBSrvSession sess)
Notify the server that a session has been closed.
|
void |
shutdownServer(boolean immediate)
Shutdown the SMB server
|
void |
startServer()
Start the SMB server in a seperate thread
|
addFileListener, fireCloseFileEvent, fireOpenFileEvent, getFilesystemConfiguration, removeFileListener
addServerListener, addSessionListener, clearException, findShare, fireServerEvent, fireSessionClosedEvent, fireSessionLoggedOnEvent, fireSessionOpenEvent, getAccessControlManager, getConfiguration, getException, getFullShareList, getGlobalConfiguration, getProtocolName, getSecurityConfiguration, getServerAddresses, getShareList, getShareMapper, hasAccessControlManager, hasDebug, hasDebugFlag, hasException, hasShutdown, isActive, isEnabled, isVersion, removeServerListener, removeSessionListener, setActive, setDebug, setDebugFlags, setEnabled, setException, setServerAddresses, setShutdown, setVersion
public static final int CIFSNetBIOSNamesAdded
public SMBServer(ServerConfiguration cfg) throws IOException
cfg
- ServerConfigurationIOException
public final void addSession(SMBSrvSession sess)
sess
- SMBSrvSessionprotected final void checkReadOnly(SharedDevice shr)
shr
- SharedDevicepublic final void deleteTemporaryShares(SMBSrvSession sess)
sess
- SMBSrvSessionpublic final CIFSConfigSection getCIFSConfiguration()
public final String getComment()
public final String getServerName()
public final int getServerType()
public final int getSessionDebug()
public final DialectSelector getSMBDialects()
public final ICifsAuthenticator getCifsAuthenticator()
public final SrvSessionList getSessions()
public final CIFSPacketPool getPacketPool()
public final ThreadRequestPool getThreadPool()
protected final void sessionClosed(SMBSrvSession sess)
sess
- SMBSrvSessionprotected final void sessionLoggedOn(SMBSrvSession sess)
sess
- SMBSrvSessionprotected final void sessionOpened(SMBSrvSession sess)
sess
- SMBSrvSessionpublic final void shutdownServer(boolean immediate)
shutdownServer
in class NetworkServer
immediate
- booleanpublic void startServer()
startServer
in class NetworkServer
public int configurationChanged(int id, ServerConfiguration config, Object newVal) throws InvalidConfigurationException
configurationChanged
in interface ConfigurationListener
id
- intconfig
- ServerConfigurationnewVal
- ObjectInvalidConfigurationException
public final UUID getServerGUID()
public final void fireNetBIOSNamesAddedEvent(int lana)
lana
- intCopyright © 2005–2017 Alfresco Software. All rights reserved.