java.lang.Object
java.lang.Thread
org.codelibs.jcifs.smb.context.AbstractCIFSContext
org.codelibs.jcifs.smb.context.BaseContext
- All Implemented Interfaces:
Runnable,CIFSContext
- Direct Known Subclasses:
SingletonContext
Base implementation of CIFS context providing core functionality for SMB operations.
This class serves as the foundation for context implementations in the jCIFS library.
- Author:
- mbechler
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclose()Close all connections and release resources associated with this contextGet a resourceGet the buffer cache for efficient memory managementGet the configuration object for this contextprotected CredentialsGets the default credentials for this context.getDfs()Get the DFS resolver for handling distributed file system pathsGet the name service client for NetBIOS name resolutionGet a pipe resourceGet the SID resolver for resolving security identifiersGet the transport pool for managing SMB connectionsGet a URL stream handler for SMB URLsMethods inherited from class org.codelibs.jcifs.smb.context.AbstractCIFSContext
getCredentials, hasDefaultCredentials, renewCredentials, run, withAnonymousCredentials, withCredentials, withDefaultCredentials, withGuestCredentialsMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
BaseContext
Construct a context- Parameters:
config- configuration for the context
-
-
Method Details
-
get
Get a resource- Parameters:
url- the URL of the SMB resource- Returns:
- the SMB resource at the specified location
- Throws:
CIFSException- if the URL is malformed or there is an error creating the SMB resource- See Also:
-
getPipe
Get a pipe resource- Parameters:
url- the URL of the SMB pipe resourcepipeType- the type of the pipe- Returns:
- the SMB pipe resource at the specified location
- Throws:
CIFSException- if the pipe resource cannot be accessed- See Also:
-
getTransportPool
Description copied from interface:CIFSContextGet the transport pool for managing SMB connections- Returns:
- the transport pool
-
getConfig
Get the configuration object for this context- Returns:
- the active configuration
- See Also:
-
getDfs
Get the DFS resolver for handling distributed file system paths- Returns:
- the DFS instance for this context
- See Also:
-
getNameServiceClient
Get the name service client for NetBIOS name resolution- Returns:
- the name server client
- See Also:
-
getBufferCache
Get the buffer cache for efficient memory management- Returns:
- the buffer cache
- See Also:
-
getUrlHandler
Get a URL stream handler for SMB URLs- Returns:
- an URL handler using this context
- See Also:
-
getSIDResolver
Get the SID resolver for resolving security identifiers- Returns:
- the SID resolver for this context
- See Also:
-
getDefaultCredentials
Gets the default credentials for this context.- Specified by:
getDefaultCredentialsin classAbstractCIFSContext- Returns:
- the default credentials for this context
- See Also:
-
close
Close all connections and release resources associated with this context- Specified by:
closein interfaceCIFSContext- Overrides:
closein classAbstractCIFSContext- Returns:
- whether any connection was still in use
- Throws:
CIFSException- if an error occurs during cleanup- See Also:
-