GridFTPControlChannel (Java Globus API)

org.globus.ftp.extended
Class GridFTPControlChannel

java.lang.Object
  |
  +--org.globus.ftp.vanilla.BasicClientControlChannel
        |
        +--org.globus.ftp.vanilla.FTPControlChannel
              |
              +--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  GlobusProxy credentials
           
protected static int TIMEOUT
           
 
Fields inherited from class org.globus.ftp.vanilla.FTPControlChannel
CRLF, ftpIn, ftpOut, hasBeenOpened, host, port, rawFtpIn, socket
 
Fields inherited from class org.globus.ftp.vanilla.BasicClientControlChannel
WAIT_FOREVER
 
Constructor Summary
GridFTPControlChannel(java.io.InputStream in, java.io.OutputStream out)
           
GridFTPControlChannel(java.lang.String host, int port)
           
 
Method Summary
 void authenticate(GlobusProxy proxy)
          Performs authentication with specified user credentials.
 Authorization getAuthorization()
          Returns authorization method for the control channel.
protected  GlobusProxy getCredentials()
           
 void open()
          opens the connection and returns after it is ready for communication.
 void setAuthorization(Authorization authorization)
          Sets authorization method for the control channel.
protected  void setCredentials(GlobusProxy credentials)
           
 
Methods inherited from class org.globus.ftp.vanilla.FTPControlChannel
close, exchange, execute, finalize, getBufferedReader, getHost, getOutputStream, getPort, hasBeenOpened, haveStreams, 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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMEOUT

protected static final int TIMEOUT
See Also:
Constant Field Values

credentials

protected GlobusProxy credentials

authorization

protected Authorization authorization
Constructor Detail

GridFTPControlChannel

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

GridFTPControlChannel

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

open

public void open()
          throws java.io.IOException,
                 ServerException
Description copied from class: FTPControlChannel
opens the connection and returns after it is ready for communication. Before returning, it intercepts the initial server reply(-ies), and not positive, throws UnexpectedReplyCodeException. After returning, there should be no more queued replies on the line. Here's the sequence for connection establishment (rfc959):
	   120
         220
	   220
     421

Overrides:
open in class FTPControlChannel
Throws:
ServerException - on negative or faulty server reply
java.io.IOException - on I/O error

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(GlobusProxy proxy)
                  throws java.io.IOException,
                         ServerException
Performs authentication with specified user credentials.

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

setCredentials

protected void setCredentials(GlobusProxy credentials)

getCredentials

protected GlobusProxy getCredentials()