org.globus.ftp.extended
Class GridFTPControlChannel

java.lang.Object
  extended by org.globus.ftp.vanilla.BasicClientControlChannel
      extended by org.globus.ftp.vanilla.FTPControlChannel
          extended by org.globus.ftp.extended.GridFTPControlChannel

public class GridFTPControlChannel
extends FTPControlChannel

GridFTP control channel, unlike the vanilla control channel, uses GSI autentication.


Field Summary
protected  Authorization authorization
           
protected  org.ietf.jgss.GSSCredential credentials
           
protected  int protection
           
protected static int TIMEOUT
           
 
Fields inherited from class org.globus.ftp.vanilla.FTPControlChannel
CRLF, ftpIn, ftpOut, hasBeenOpened, host, port, rawFtpIn, socket
 
Constructor Summary
GridFTPControlChannel(java.io.InputStream in, java.io.OutputStream out)
           
GridFTPControlChannel(java.lang.String host, int port)
           
 
Method Summary
 void authenticate(org.ietf.jgss.GSSCredential credential)
          Performs authentication with specified user credentials.
 void authenticate(org.ietf.jgss.GSSCredential credential, java.lang.String username)
          Performs authentication with specified user credentials and a specific username (assuming the user dn maps to the passed username).
 Authorization getAuthorization()
          Returns authorization method for the control channel.
protected  org.ietf.jgss.GSSCredential getCredentials()
           
 int getProtection()
          Returns control channel protection level.
 void setAuthorization(Authorization authorization)
          Sets authorization method for the control channel.
protected  void setCredentials(org.ietf.jgss.GSSCredential credentials)
           
 void setProtection(int protection)
          Sets data channel protection level.
 
Methods inherited from class org.globus.ftp.vanilla.FTPControlChannel
abortTransfer, close, exchange, execute, getBufferedReader, getHost, getLastReply, getOutputStream, getPort, hasBeenOpened, haveStreams, isIPv6, open, read, readInitialReplies, setInputStream, setOutputStream, waitFor, write, writeln, writeStr
 
Methods inherited from class org.globus.ftp.vanilla.BasicClientControlChannel
waitFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMEOUT

protected static final int TIMEOUT
See Also:
Constant Field Values

credentials

protected org.ietf.jgss.GSSCredential credentials

authorization

protected Authorization authorization

protection

protected int protection
Constructor Detail

GridFTPControlChannel

public GridFTPControlChannel(java.lang.String host,
                             int port)

GridFTPControlChannel

public GridFTPControlChannel(java.io.InputStream in,
                             java.io.OutputStream out)
Method Detail

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(org.ietf.jgss.GSSCredential credential)
                  throws java.io.IOException,
                         ServerException
Performs authentication with specified user credentials.

Parameters:
credential - user credentials to use.
Throws:
java.io.IOException - on i/o error
ServerException - on server refusal or faulty server behavior

authenticate

public void authenticate(org.ietf.jgss.GSSCredential credential,
                         java.lang.String username)
                  throws java.io.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:
java.io.IOException - on i/o error
ServerException - on server refusal or faulty server behavior

setCredentials

protected void setCredentials(org.ietf.jgss.GSSCredential credentials)

getCredentials

protected org.ietf.jgss.GSSCredential getCredentials()


Copyright © 2013. All Rights Reserved.