Package jcifs.context
Class BaseContext
- java.lang.Object
-
- java.lang.Thread
-
- jcifs.context.AbstractCIFSContext
-
- jcifs.context.BaseContext
-
- All Implemented Interfaces:
Runnable
,CIFSContext
- Direct Known Subclasses:
SingletonContext
public class BaseContext extends AbstractCIFSContext
- 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 Constructor Description BaseContext(Configuration config)
Construct a context
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
close()
SmbResource
get(String url)
Get a resourceBufferCache
getBufferCache()
Configuration
getConfig()
protected Credentials
getDefaultCredentials()
DfsResolver
getDfs()
NameServiceClient
getNameServiceClient()
SmbPipeResource
getPipe(String url, int pipeType)
Get a pipe resourceSidResolver
getSIDResolver()
SmbTransportPool
getTransportPool()
URLStreamHandler
getUrlHandler()
-
Methods inherited from class jcifs.context.AbstractCIFSContext
getCredentials, hasDefaultCredentials, renewCredentials, run, withAnonymousCredentials, withCredentials, withDefaultCredentials, withGuestCrendentials
-
Methods 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 Detail
-
BaseContext
public BaseContext(Configuration config)
Construct a context- Parameters:
config
- configuration for the context
-
-
Method Detail
-
get
public SmbResource get(String url) throws CIFSException
Get a resource- Returns:
- the SMB resource at the specified location
- Throws:
CIFSException
- See Also:
CIFSContext.get(java.lang.String)
-
getPipe
public SmbPipeResource getPipe(String url, int pipeType) throws CIFSException
Get a pipe resourcepipeType
- the type of the pipe- Returns:
- the SMB pipe resource at the specified location
- Throws:
CIFSException
- See Also:
CIFSContext.getPipe(java.lang.String, int)
-
getTransportPool
public SmbTransportPool getTransportPool()
- Returns:
- the transport pool
-
getConfig
public Configuration getConfig()
- Returns:
- the active configuration
- See Also:
CIFSContext.getConfig()
-
getDfs
public DfsResolver getDfs()
- Returns:
- the DFS instance for this context
- See Also:
CIFSContext.getDfs()
-
getNameServiceClient
public NameServiceClient getNameServiceClient()
- Returns:
- the name server client
- See Also:
CIFSContext.getNameServiceClient()
-
getBufferCache
public BufferCache getBufferCache()
- Returns:
- the buffer cache
- See Also:
CIFSContext.getBufferCache()
-
getUrlHandler
public URLStreamHandler getUrlHandler()
- Returns:
- an URL handler using this context
- See Also:
CIFSContext.getUrlHandler()
-
getSIDResolver
public SidResolver getSIDResolver()
- Returns:
- the SID resolver for this context
- See Also:
CIFSContext.getSIDResolver()
-
getDefaultCredentials
protected Credentials getDefaultCredentials()
- Specified by:
getDefaultCredentials
in classAbstractCIFSContext
- Returns:
- See Also:
AbstractCIFSContext.getDefaultCredentials()
-
close
public boolean close() throws CIFSException
- Specified by:
close
in interfaceCIFSContext
- Overrides:
close
in classAbstractCIFSContext
- Returns:
- whether any connection was still in use
- Throws:
CIFSException
- See Also:
CIFSContext.close()
-
-