java.lang.Object
org.codelibs.jcifs.smb.context.CIFSContextWrapper
org.codelibs.jcifs.smb.context.CIFSContextCredentialWrapper
- All Implemented Interfaces:
CIFSContext
Context wrapper supplying alternate credentials
- Author:
- mbechler
-
Constructor Summary
ConstructorsConstructorDescriptionCIFSContextCredentialWrapper(AbstractCIFSContext delegate, Credentials creds) Constructs a CIFS context wrapper with custom credentials. -
Method Summary
Modifier and TypeMethodDescriptionGet the credentials associated with this contextbooleanrenewCredentials(String locationHint, Throwable error) Attempt to renew credentials after authentication failureMethods inherited from class org.codelibs.jcifs.smb.context.CIFSContextWrapper
close, get, getBufferCache, getConfig, getDfs, getNameServiceClient, getPipe, getSIDResolver, getTransportPool, getUrlHandler, hasDefaultCredentials, withAnonymousCredentials, withCredentials, withDefaultCredentials, withGuestCredentials, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codelibs.jcifs.smb.CIFSContext
close, get, getBufferCache, getConfig, getDfs, getNameServiceClient, getPipe, getSIDResolver, getTransportPool, getUrlHandler, hasDefaultCredentials, withAnonymousCredentials, withCredentials, withDefaultCredentials, withGuestCredentials
-
Constructor Details
-
CIFSContextCredentialWrapper
Constructs a CIFS context wrapper with custom credentials.- Parameters:
delegate- the context to wrapcreds- Credentials to use
-
-
Method Details
-
getCredentials
Get the credentials associated with this context- Specified by:
getCredentialsin interfaceCIFSContext- Overrides:
getCredentialsin classCIFSContextWrapper- Returns:
- the used credentials
- See Also:
-
renewCredentials
Attempt to renew credentials after authentication failure- Specified by:
renewCredentialsin interfaceCIFSContext- Overrides:
renewCredentialsin classCIFSContextWrapper- Parameters:
locationHint- URL or location hint for credential renewalerror- the error that triggered renewal- Returns:
- whether new credentials are obtained
- See Also:
-