public class SingletonContext extends BaseContext implements CIFSContext
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Modifier and Type | Method and Description |
|---|---|
static SingletonContext |
getInstance()
Get singleton context
The singleton context will use system properties for configuration as well as values specified in a file
specified through this jcifs.properties system property.
|
static void |
init(Properties props)
Initialize singleton context using custom properties
This method can only be called once.
|
static void |
registerSmbURLHandler()
This static method registers the SMB URL protocol handler which is
required to use SMB URLs with the java.net.URL class.
|
close, get, getBufferCache, getConfig, getDfs, getNameServiceClient, getPipe, getSIDResolver, getTransportPool, getUrlHandlergetCredentials, hasDefaultCredentials, renewCredentials, run, withAnonymousCredentials, withCredentials, withDefaultCredentials, withGuestCrendentialsactiveCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldequals, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, get, getBufferCache, getConfig, getCredentials, getDfs, getNameServiceClient, getPipe, getSIDResolver, getTransportPool, getUrlHandler, hasDefaultCredentials, renewCredentials, withAnonymousCredentials, withCredentials, withDefaultCredentials, withGuestCrendentialspublic static final void init(Properties props) throws CIFSException
props - CIFSExceptionpublic static final SingletonContext getInstance()
public static void registerSmbURLHandler()
Exception MalformedURLException: unknown protocol: smb
at java.net.URL.<init>(URL.java:480)
at java.net.URL.<init>(URL.java:376)
at java.net.URL.<init>(URL.java:330)
at jcifs.smb.SmbFile.<init>(SmbFile.java:355)
...
Copyright © 2023. All rights reserved.