Module jcifs

Interface SmbTransportPool

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 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 use
      name - the server name or address
      port - the port number
      exclusive - whether to acquire an unshared connection
      forceSigning - whether to enforce SMB signing
      Returns:
      a connected transport
      Throws:
      UnknownHostException - if the host cannot be resolved
      IOException - if an I/O error occurs
    • getSmbTransport

      SmbTransport getSmbTransport(CIFSContext tc, Address address, int port, boolean exclusive)
      Get transport connection
      Parameters:
      tc - context to use
      address - the server address
      port - the port number
      exclusive - 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 use
      address - the server address
      port - the port number
      exclusive - whether to acquire an unshared connection
      forceSigning - 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 use
      address - the server address
      port - the port number
      localAddr - the local address to bind to
      localPort - the local port to bind to
      hostName - the server host name
      exclusive - 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 use
      address - the server address
      port - the port number
      localAddr - the local address to bind to
      localPort - the local port to bind to
      hostName - the server host name
      exclusive - whether to acquire an unshared connection
      forceSigning - whether to enforce SMB signing on this connection
      Returns:
      a transport connection to the target
    • removeTransport

      void removeTransport(SmbTransport trans)
      Removes a transport from the pool.
      Parameters:
      trans - the transport to remove
    • close

      boolean close() throws CIFSException
      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 void logon(CIFSContext tc, Address dc) throws CIFSException
      Deprecated.
      functionality is broken and will be removed at some point, use actual Active Directory authentication instead
      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 org.codelibs.jcifs.smb.impl.client.logonShare property.

      Parameters:
      dc - the domain controller address
      tc - the CIFS context containing credentials
      Throws:
      CIFSException - if an error occurs during authentication
    • logon

      @Deprecated void logon(CIFSContext tc, Address dc, int port) throws CIFSException
      Deprecated.
      functionality is broken and will be removed at some point, use actual Active Directory authentication instead
      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 org.codelibs.jcifs.smb.impl.client.logonShare property.

      Parameters:
      dc - the domain controller address
      port - the port number
      tc - the CIFS context containing credentials
      Throws:
      CIFSException - if an error occurs during authentication
    • getChallenge

      @Deprecated byte[] getChallenge(CIFSContext tc, Address dc) throws CIFSException
      Deprecated.
      functionality is broken and will be removed at some point, use actual Active Directory authentication instead
      Get NTLM challenge from a server
      Parameters:
      dc - the domain controller address
      tc - the CIFS context containing credentials
      Returns:
      NTLM challenge
      Throws:
      CIFSException - if an error occurs during authentication
    • getChallenge

      @Deprecated byte[] getChallenge(CIFSContext tc, Address dc, int port) throws CIFSException
      Deprecated.
      functionality is broken and will be removed at some point, use actual Active Directory authentication instead
      Get NTLM challenge from a server
      Parameters:
      dc - the domain controller address
      port - the port number
      tc - the CIFS context containing credentials
      Returns:
      NTLM challenge
      Throws:
      CIFSException - if an error occurs during authentication