Package jcifs.smb
Class SmbTransportPoolImpl
- java.lang.Object
-
- jcifs.smb.SmbTransportPoolImpl
-
- All Implemented Interfaces:
SmbTransportPool
public class SmbTransportPoolImpl extends Object implements SmbTransportPool
- Author:
- mbechler
-
-
Constructor Summary
Constructors Constructor Description SmbTransportPoolImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
close()
Closes the pool and all connections in itboolean
contains(SmbTransport trans)
byte[]
getChallenge(CIFSContext tf, Address dc)
Get NTLM challenge from a serverbyte[]
getChallenge(CIFSContext tf, Address dc, int port)
Get NTLM challenge from a serverjcifs.smb.SmbTransportImpl
getSmbTransport(CIFSContext tf, String name, int port, boolean exclusive, boolean forceSigning)
jcifs.smb.SmbTransportImpl
getSmbTransport(CIFSContext tc, Address address, int port, boolean nonPooled)
Get transport connectionjcifs.smb.SmbTransportImpl
getSmbTransport(CIFSContext tc, Address address, int port, boolean nonPooled, boolean forceSigning)
Get transport connectionjcifs.smb.SmbTransportImpl
getSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean nonPooled)
Get transport connection, with local bindingjcifs.smb.SmbTransportImpl
getSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean nonPooled, boolean forceSigning)
void
logon(CIFSContext tf, Address dc)
Authenticate arbitrary credentials represented by the NtlmPasswordAuthentication object against the domain controller specified by the UniAddress parameter.void
logon(CIFSContext tf, Address dc, int port)
Deprecated.void
removeTransport(SmbTransport trans)
-
-
-
Method Detail
-
getSmbTransport
public jcifs.smb.SmbTransportImpl getSmbTransport(CIFSContext tc, Address address, int port, boolean nonPooled)
Description copied from interface:SmbTransportPool
Get transport connection- Specified by:
getSmbTransport
in interfaceSmbTransportPool
- Parameters:
tc
- context to usenonPooled
- whether to acquire an unshared connection- Returns:
- a transport connection to the target
-
getSmbTransport
public jcifs.smb.SmbTransportImpl getSmbTransport(CIFSContext tc, Address address, int port, boolean nonPooled, boolean forceSigning)
Description copied from interface:SmbTransportPool
Get transport connection- Specified by:
getSmbTransport
in interfaceSmbTransportPool
- Parameters:
tc
- context to usenonPooled
- whether to acquire an unshared connectionforceSigning
- whether to enforce SMB signing on this connection- Returns:
- a transport connection to the target
-
getSmbTransport
public jcifs.smb.SmbTransportImpl getSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean nonPooled)
Description copied from interface:SmbTransportPool
Get transport connection, with local binding- Specified by:
getSmbTransport
in interfaceSmbTransportPool
- Parameters:
tc
- context to usenonPooled
- whether to acquire an unshared connection- Returns:
- a transport connection to the target
-
getSmbTransport
public jcifs.smb.SmbTransportImpl getSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean nonPooled, boolean forceSigning)
- Specified by:
getSmbTransport
in interfaceSmbTransportPool
- Parameters:
tc
- context to usenonPooled
- whether to acquire an unshared connectionforceSigning
- whether to enforce SMB signing on this connection- Returns:
- a transport connection to the target
-
getSmbTransport
public jcifs.smb.SmbTransportImpl getSmbTransport(CIFSContext tf, String name, int port, boolean exclusive, boolean forceSigning) throws IOException
- Specified by:
getSmbTransport
in interfaceSmbTransportPool
- Returns:
- a connected transport
- Throws:
UnknownHostException
IOException
-
contains
public boolean contains(SmbTransport trans)
- Parameters:
trans
-- Returns:
- whether (non-exclusive) connection is in the pool
-
removeTransport
public void removeTransport(SmbTransport trans)
- Specified by:
removeTransport
in interfaceSmbTransportPool
-
close
public boolean close() throws CIFSException
Closes the pool and all connections in it- Specified by:
close
in interfaceSmbTransportPool
- Returns:
- whether any transport was still in use
- Throws:
CIFSException
- See Also:
SmbTransportPool.close()
-
getChallenge
public byte[] getChallenge(CIFSContext tf, Address dc) throws SmbException
Description copied from interface:SmbTransportPool
Get NTLM challenge from a server- Specified by:
getChallenge
in interfaceSmbTransportPool
- Returns:
- NTLM challenge
- Throws:
SmbException
-
getChallenge
public byte[] getChallenge(CIFSContext tf, Address dc, int port) throws SmbException
Description copied from interface:SmbTransportPool
Get NTLM challenge from a server- Specified by:
getChallenge
in interfaceSmbTransportPool
- Returns:
- NTLM challenge
- Throws:
SmbException
-
logon
public void logon(CIFSContext tf, Address dc) throws SmbException
Description copied from interface:SmbTransportPool
Authenticate arbitrary credentials represented by the NtlmPasswordAuthentication object against the domain controller specified by the UniAddress parameter. If the credentials are not accepted, an SmbAuthException will be thrown. If an error occurs an SmbException will be thrown. If the credentials are valid, the method will return without throwing an exception. See the last FAQ question.See also the jcifs.smb.client.logonShare property.
- Specified by:
logon
in interfaceSmbTransportPool
- Throws:
SmbException
-
logon
@Deprecated public void logon(CIFSContext tf, Address dc, int port) throws SmbException
Deprecated.Description copied from interface:SmbTransportPool
Authenticate arbitrary credentials represented by the NtlmPasswordAuthentication object against the domain controller specified by the UniAddress parameter. If the credentials are not accepted, an SmbAuthException will be thrown. If an error occurs an SmbException will be thrown. If the credentials are valid, the method will return without throwing an exception. See the last FAQ question.See also the jcifs.smb.client.logonShare property.
- Specified by:
logon
in interfaceSmbTransportPool
- Throws:
SmbException
-
-