Package jcifs.context
Class CIFSContextWrapper
- java.lang.Object
-
- jcifs.context.CIFSContextWrapper
-
- All Implemented Interfaces:
CIFSContext
- Direct Known Subclasses:
CIFSContextCredentialWrapper
public class CIFSContextWrapper extends Object implements CIFSContext
- Author:
- mbechler
-
-
Constructor Summary
Constructors Constructor Description CIFSContextWrapper(CIFSContext delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanclose()SmbResourceget(String url)Get a resourceBufferCachegetBufferCache()ConfigurationgetConfig()CredentialsgetCredentials()DfsResolvergetDfs()NameServiceClientgetNameServiceClient()SmbPipeResourcegetPipe(String url, int pipeType)Get a pipe resourceSidResolvergetSIDResolver()SmbTransportPoolgetTransportPool()URLStreamHandlergetUrlHandler()booleanhasDefaultCredentials()booleanrenewCredentials(String locationHint, Throwable error)CIFSContextwithAnonymousCredentials()CIFSContextwithCredentials(Credentials creds)CIFSContextwithDefaultCredentials()CIFSContextwithGuestCrendentials()protected CIFSContextwrap(CIFSContext newContext)
-
-
-
Constructor Detail
-
CIFSContextWrapper
public CIFSContextWrapper(CIFSContext delegate)
- Parameters:
delegate- context to delegate non-override methods to
-
-
Method Detail
-
get
public SmbResource get(String url) throws CIFSException
Get a resource- Specified by:
getin interfaceCIFSContext- 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 resource- Specified by:
getPipein interfaceCIFSContextpipeType- the type of the pipe- Returns:
- the SMB pipe resource at the specified location
- Throws:
CIFSException- See Also:
CIFSContext.getPipe(java.lang.String, int)
-
wrap
protected CIFSContext wrap(CIFSContext newContext)
-
getConfig
public Configuration getConfig()
- Specified by:
getConfigin interfaceCIFSContext- Returns:
- the active configuration
-
getDfs
public DfsResolver getDfs()
- Specified by:
getDfsin interfaceCIFSContext- Returns:
- the DFS instance for this context
-
getCredentials
public Credentials getCredentials()
- Specified by:
getCredentialsin interfaceCIFSContext- Returns:
- the used credentials
-
getUrlHandler
public URLStreamHandler getUrlHandler()
- Specified by:
getUrlHandlerin interfaceCIFSContext- Returns:
- an URL handler using this context
-
getSIDResolver
public SidResolver getSIDResolver()
- Specified by:
getSIDResolverin interfaceCIFSContext- Returns:
- the SID resolver for this context
-
hasDefaultCredentials
public boolean hasDefaultCredentials()
- Specified by:
hasDefaultCredentialsin interfaceCIFSContext- Returns:
- whether default credentials are available
-
withCredentials
public CIFSContext withCredentials(Credentials creds)
- Specified by:
withCredentialsin interfaceCIFSContext- Returns:
- a child context using using the given credentials
-
withDefaultCredentials
public CIFSContext withDefaultCredentials()
- Specified by:
withDefaultCredentialsin interfaceCIFSContext- Returns:
- a child context using the configured default credentials
-
withAnonymousCredentials
public CIFSContext withAnonymousCredentials()
- Specified by:
withAnonymousCredentialsin interfaceCIFSContext- Returns:
- a child context using anonymous credentials
-
withGuestCrendentials
public CIFSContext withGuestCrendentials()
- Specified by:
withGuestCrendentialsin interfaceCIFSContext- Returns:
- a child context using guest credentials
-
renewCredentials
public boolean renewCredentials(String locationHint, Throwable error)
- Specified by:
renewCredentialsin interfaceCIFSContext- Returns:
- whether new credentials are obtained
-
getNameServiceClient
public NameServiceClient getNameServiceClient()
- Specified by:
getNameServiceClientin interfaceCIFSContext- Returns:
- the name server client
-
getBufferCache
public BufferCache getBufferCache()
- Specified by:
getBufferCachein interfaceCIFSContext- Returns:
- the buffer cache
-
getTransportPool
public SmbTransportPool getTransportPool()
- Specified by:
getTransportPoolin interfaceCIFSContext- Returns:
- the transport pool
-
close
public boolean close() throws CIFSException- Specified by:
closein interfaceCIFSContext- Returns:
- whether any connection was still in use
- Throws:
CIFSException
-
-