Package jcifs.context
Class AbstractCIFSContext
- java.lang.Object
-
- java.lang.Thread
-
- jcifs.context.AbstractCIFSContext
-
- All Implemented Interfaces:
Runnable,CIFSContext
- Direct Known Subclasses:
BaseContext
public abstract class AbstractCIFSContext extends Thread implements CIFSContext
- 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 AbstractCIFSContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanclose()CredentialsgetCredentials()protected abstract CredentialsgetDefaultCredentials()booleanhasDefaultCredentials()booleanrenewCredentials(String locationHint, Throwable error)voidrun()CIFSContextwithAnonymousCredentials()CIFSContextwithCredentials(Credentials creds)CIFSContextwithDefaultCredentials()CIFSContextwithGuestCrendentials()-
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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jcifs.CIFSContext
get, getBufferCache, getConfig, getDfs, getNameServiceClient, getPipe, getSIDResolver, getTransportPool, getUrlHandler
-
-
-
-
Method Detail
-
withCredentials
public CIFSContext withCredentials(Credentials creds)
- Specified by:
withCredentialsin interfaceCIFSContext- Parameters:
creds-- Returns:
- a wrapped context with the given credentials
-
withAnonymousCredentials
public CIFSContext withAnonymousCredentials()
- Specified by:
withAnonymousCredentialsin interfaceCIFSContext- Returns:
- a child context using anonymous credentials
- See Also:
CIFSContext.withAnonymousCredentials()
-
withDefaultCredentials
public CIFSContext withDefaultCredentials()
- Specified by:
withDefaultCredentialsin interfaceCIFSContext- Returns:
- a child context using the configured default credentials
- See Also:
CIFSContext.withDefaultCredentials()
-
withGuestCrendentials
public CIFSContext withGuestCrendentials()
- Specified by:
withGuestCrendentialsin interfaceCIFSContext- Returns:
- a child context using guest credentials
- See Also:
CIFSContext.withGuestCrendentials()
-
getCredentials
public Credentials getCredentials()
- Specified by:
getCredentialsin interfaceCIFSContext- Returns:
- the used credentials
- See Also:
CIFSContext.getCredentials()
-
hasDefaultCredentials
public boolean hasDefaultCredentials()
- Specified by:
hasDefaultCredentialsin interfaceCIFSContext- Returns:
- whether default credentials are available
- See Also:
CIFSContext.hasDefaultCredentials()
-
getDefaultCredentials
protected abstract Credentials getDefaultCredentials()
- Returns:
-
renewCredentials
public boolean renewCredentials(String locationHint, Throwable error)
- Specified by:
renewCredentialsin interfaceCIFSContext- Returns:
- whether new credentials are obtained
- See Also:
CIFSContext.renewCredentials(java.lang.String, java.lang.Throwable)
-
close
public boolean close() throws CIFSException- Specified by:
closein interfaceCIFSContext- Returns:
- whether any connection was still in use
- Throws:
CIFSException- See Also:
CIFSContext.close()
-
run
public void run()
- Specified by:
runin interfaceRunnable- Overrides:
runin classThread- See Also:
Thread.run()
-
-