Class GridFTPControlChannel


public class GridFTPControlChannel extends FTPControlChannel
GridFTP control channel, unlike the vanilla control channel, uses GSI autentication.
  • Field Details

    • logger

      private static org.apache.commons.logging.Log logger
    • TIMEOUT

      protected static final int TIMEOUT
      See Also:
    • credentials

      protected GSSCredential credentials
    • authorization

      protected Authorization authorization
    • protection

      protected int protection
  • Constructor Details

    • GridFTPControlChannel

      public GridFTPControlChannel(String host, int port)
    • GridFTPControlChannel

      public GridFTPControlChannel(InputStream in, OutputStream out)
  • Method Details

    • setProtection

      public void setProtection(int protection)
      Sets data channel protection level.
      Parameters:
      protection - should be CLEAR, SAFE, or PRIVATE, or CONFIDENTIAL.
    • getProtection

      public int getProtection()
      Returns control channel protection level.
      Returns:
      control channel protection level: CLEAR, SAFE, or PRIVATE, or CONFIDENTIAL.
    • setAuthorization

      public void setAuthorization(Authorization authorization)
      Sets authorization method for the control channel.
      Parameters:
      authorization - authorization method.
    • getAuthorization

      public Authorization getAuthorization()
      Returns authorization method for the control channel.
      Returns:
      authorization method performed on the control channel.
    • authenticate

      public void authenticate(GSSCredential credential) throws IOException, ServerException
      Performs authentication with specified user credentials.
      Parameters:
      credential - user credentials to use.
      Throws:
      IOException - on i/o error
      ServerException - on server refusal or faulty server behavior
    • authenticate

      public void authenticate(GSSCredential credential, String username) throws IOException, ServerException
      Performs authentication with specified user credentials and a specific username (assuming the user dn maps to the passed username).
      Parameters:
      credential - user credentials to use.
      username - specific username to authenticate as.
      Throws:
      IOException - on i/o error
      ServerException - on server refusal or faulty server behavior
    • setCredentials

      protected void setCredentials(GSSCredential credentials)
    • getCredentials

      protected GSSCredential getCredentials()