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 booleanclose()Closes the pool and all connections in itbooleancontains(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.SmbTransportImplgetSmbTransport(CIFSContext tf, String name, int port, boolean exclusive, boolean forceSigning)jcifs.smb.SmbTransportImplgetSmbTransport(CIFSContext tc, Address address, int port, boolean nonPooled)Get transport connectionjcifs.smb.SmbTransportImplgetSmbTransport(CIFSContext tc, Address address, int port, boolean nonPooled, boolean forceSigning)Get transport connectionjcifs.smb.SmbTransportImplgetSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean nonPooled)Get transport connection, with local bindingjcifs.smb.SmbTransportImplgetSmbTransport(CIFSContext tc, Address address, int port, InetAddress localAddr, int localPort, String hostName, boolean nonPooled, boolean forceSigning)voidlogon(CIFSContext tf, Address dc)Authenticate arbitrary credentials represented by the NtlmPasswordAuthentication object against the domain controller specified by the UniAddress parameter.voidlogon(CIFSContext tf, Address dc, int port)Deprecated.voidremoveTransport(SmbTransport trans)
-
-
-
Method Detail
-
getSmbTransport
public jcifs.smb.SmbTransportImpl getSmbTransport(CIFSContext tc, Address address, int port, boolean nonPooled)
Description copied from interface:SmbTransportPoolGet transport connection- Specified by:
getSmbTransportin 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:SmbTransportPoolGet transport connection- Specified by:
getSmbTransportin 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:SmbTransportPoolGet transport connection, with local binding- Specified by:
getSmbTransportin 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:
getSmbTransportin 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:
getSmbTransportin interfaceSmbTransportPool- Returns:
- a connected transport
- Throws:
UnknownHostExceptionIOException
-
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:
removeTransportin interfaceSmbTransportPool
-
close
public boolean close() throws CIFSExceptionCloses the pool and all connections in it- Specified by:
closein 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:SmbTransportPoolGet NTLM challenge from a server- Specified by:
getChallengein interfaceSmbTransportPool- Returns:
- NTLM challenge
- Throws:
SmbException
-
getChallenge
public byte[] getChallenge(CIFSContext tf, Address dc, int port) throws SmbException
Description copied from interface:SmbTransportPoolGet NTLM challenge from a server- Specified by:
getChallengein interfaceSmbTransportPool- Returns:
- NTLM challenge
- Throws:
SmbException
-
logon
public void logon(CIFSContext tf, Address dc) throws SmbException
Description copied from interface:SmbTransportPoolAuthenticate 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:
logonin interfaceSmbTransportPool- Throws:
SmbException
-
logon
@Deprecated public void logon(CIFSContext tf, Address dc, int port) throws SmbException
Deprecated.Description copied from interface:SmbTransportPoolAuthenticate 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:
logonin interfaceSmbTransportPool- Throws:
SmbException
-
-