- All Known Implementing Classes:
SmbTransportPoolImpl
public interface SmbTransportPool
This is an internal API for managing pools of SMB connections
- Author:
- mbechler
This interface is intended for internal use.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanclose()Closes the pool and all connections in itbyte[]getChallenge(CIFSContext tc, Address dc) Deprecated.functionality is broken and will be removed at some point, use actual Active Directory authentication insteadbyte[]getChallenge(CIFSContext tc, Address dc, int port) Deprecated.functionality is broken and will be removed at some point, use actual Active Directory authentication insteadgetSmbTransport(CIFSContext tf, String name, int port, boolean exclusive, boolean forceSigning) Gets an SMB transport connection to the specified server.getSmbTransport(CIFSContext tc, Address address, int port, boolean exclusive) Get transport connectiongetSmbTransport(CIFSContext tc, Address address, int port, boolean exclusive, boolean forceSigning) Get transport connectiongetSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean exclusive) Get transport connection, with local bindinggetSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean exclusive, boolean forceSigning) Gets or creates an SMB transport for the given context.voidlogon(CIFSContext tc, Address dc) Deprecated.functionality is broken and will be removed at some point, use actual Active Directory authentication insteadvoidlogon(CIFSContext tc, Address dc, int port) Deprecated.functionality is broken and will be removed at some point, use actual Active Directory authentication insteadvoidremoveTransport(SmbTransport trans) Removes a transport from the pool.
-
Method Details
-
getSmbTransport
SmbTransport getSmbTransport(CIFSContext tf, String name, int port, boolean exclusive, boolean forceSigning) throws UnknownHostException, IOException Gets an SMB transport connection to the specified server.- Parameters:
tf- the CIFS context to usename- the server name or addressport- the port numberexclusive- whether to acquire an unshared connectionforceSigning- whether to enforce SMB signing- Returns:
- a connected transport
- Throws:
UnknownHostException- if the host cannot be resolvedIOException- if an I/O error occurs
-
getSmbTransport
Get transport connection- Parameters:
tc- context to useaddress- the server addressport- the port numberexclusive- whether to acquire an unshared connection- Returns:
- a transport connection to the target
-
getSmbTransport
SmbTransport getSmbTransport(CIFSContext tc, Address address, int port, boolean exclusive, boolean forceSigning) Get transport connection- Parameters:
tc- context to useaddress- the server addressport- the port numberexclusive- whether to acquire an unshared connectionforceSigning- whether to enforce SMB signing on this connection- Returns:
- a transport connection to the target
-
getSmbTransport
SmbTransport getSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean exclusive) Get transport connection, with local binding- Parameters:
tc- context to useaddress- the server addressport- the port numberlocalAddr- the local address to bind tolocalPort- the local port to bind tohostName- the server host nameexclusive- whether to acquire an unshared connection- Returns:
- a transport connection to the target
-
getSmbTransport
SmbTransport getSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean exclusive, boolean forceSigning) Gets or creates an SMB transport for the given context.- Parameters:
tc- context to useaddress- the server addressport- the port numberlocalAddr- the local address to bind tolocalPort- the local port to bind tohostName- the server host nameexclusive- whether to acquire an unshared connectionforceSigning- whether to enforce SMB signing on this connection- Returns:
- a transport connection to the target
-
removeTransport
Removes a transport from the pool.- Parameters:
trans- the transport to remove
-
close
Closes the pool and all connections in it- Returns:
- whether any transport was still in use
- Throws:
CIFSException- if an error occurs during authentication
-
logon
Deprecated.functionality is broken and will be removed at some point, use actual Active Directory authentication insteadAuthenticate arbitrary credentials represented by theNtlmPasswordAuthenticationobject against the domain controller specified by theUniAddressparameter. If the credentials are not accepted, anSmbAuthExceptionwill be thrown. If an error occurs anSmbExceptionwill be thrown. If the credentials are valid, the method will return without throwing an exception. See the last FAQ question.See also the
org.codelibs.jcifs.smb.impl.client.logonShareproperty.- Parameters:
dc- the domain controller addresstc- the CIFS context containing credentials- Throws:
CIFSException- if an error occurs during authentication
-
logon
Deprecated.functionality is broken and will be removed at some point, use actual Active Directory authentication insteadAuthenticate arbitrary credentials represented by theNtlmPasswordAuthenticationobject against the domain controller specified by theUniAddressparameter. If the credentials are not accepted, anSmbAuthExceptionwill be thrown. If an error occurs anSmbExceptionwill be thrown. If the credentials are valid, the method will return without throwing an exception. See the last FAQ question.See also the
org.codelibs.jcifs.smb.impl.client.logonShareproperty.- Parameters:
dc- the domain controller addressport- the port numbertc- the CIFS context containing credentials- Throws:
CIFSException- if an error occurs during authentication
-
getChallenge
Deprecated.functionality is broken and will be removed at some point, use actual Active Directory authentication insteadGet NTLM challenge from a server- Parameters:
dc- the domain controller addresstc- the CIFS context containing credentials- Returns:
- NTLM challenge
- Throws:
CIFSException- if an error occurs during authentication
-
getChallenge
Deprecated.functionality is broken and will be removed at some point, use actual Active Directory authentication insteadGet NTLM challenge from a server- Parameters:
dc- the domain controller addressport- the port numbertc- the CIFS context containing credentials- Returns:
- NTLM challenge
- Throws:
CIFSException- if an error occurs during authentication
-