Module jcifs

Interface SmbTransportInternal

All Superinterfaces:
AutoCloseable, SmbTransport

public interface SmbTransportInternal extends SmbTransport
Internal interface for SMB transport operations. This interface provides internal methods for managing SMB network transport and communication.
Author:
mbechler
  • Method Details

    • hasCapability

      boolean hasCapability(int cap) throws SmbException
      Checks if the transport supports the specified capability.
      Parameters:
      cap - the capability flag to check
      Returns:
      whether the transport has the given capability
      Throws:
      SmbException - if an error occurs checking capabilities
    • isDisconnected

      boolean isDisconnected()
      Checks if the transport has been disconnected.
      Returns:
      whether the transport has been disconnected
    • disconnect

      boolean disconnect(boolean hard, boolean inuse) throws IOException
      Disconnects the transport from the remote server.
      Parameters:
      hard - if true, force immediate disconnection
      inuse - whether the connection is currently in use
      Returns:
      whether the connection was in use
      Throws:
      IOException - if an I/O error occurs during disconnection
    • ensureConnected

      boolean ensureConnected() throws IOException
      Ensures the transport is connected to the remote server.
      Returns:
      whether the transport was connected
      Throws:
      SmbException - if an SMB error occurs
      IOException - if an I/O error occurs
    • getDfsReferrals

      DfsReferralData getDfsReferrals(CIFSContext ctx, String name, String targetHost, String targetDomain, int rn) throws CIFSException
      Gets DFS referrals for the specified path.
      Parameters:
      ctx - the CIFS context
      name - the DFS path to resolve
      targetHost - the target host name
      targetDomain - the target domain
      rn - the referral number
      Returns:
      dfs referral
      Throws:
      SmbException - if an SMB error occurs
      CIFSException - if a CIFS error occurs
    • isSigningOptional

      boolean isSigningOptional() throws SmbException
      Checks if message signing is supported but not mandatory.
      Returns:
      whether signatures are supported but not required
      Throws:
      SmbException - if an error occurs checking signing status
    • isSigningEnforced

      boolean isSigningEnforced() throws SmbException
      Checks if message signing is mandatory for this connection.
      Returns:
      whether signatures are enforced from either side
      Throws:
      SmbException - if an error occurs checking signing status
    • getServerEncryptionKey

      byte[] getServerEncryptionKey()
      Gets the server's encryption key for authentication.
      Returns:
      the encryption key used by the server
    • getSmbSession

      SmbSession getSmbSession(CIFSContext ctx)
      Gets or creates an SMB session for the given context.
      Parameters:
      ctx - the CIFS context
      Returns:
      session
    • getSmbSession

      SmbSession getSmbSession(CIFSContext tf, String targetHost, String targetDomain)
      Gets or creates an SMB session for the specified target.
      Parameters:
      tf - the CIFS context
      targetHost - the target host name
      targetDomain - the target domain
      Returns:
      session
    • isSMB2

      boolean isSMB2() throws SmbException
      Checks if this transport uses the SMB2 protocol.
      Returns:
      whether this is a SMB2 connection
      Throws:
      SmbException - if an error occurs checking protocol version
    • getInflightRequests

      int getInflightRequests()
      Gets the number of currently pending requests.
      Returns:
      number of inflight requests