GSIBaseSocket (Java Globus API)

org.globus.security.gsi
Class GSIBaseSocket

java.lang.Object
  |
  +--java.net.Socket
        |
        +--org.globus.security.gsi.GSIBaseSocket
Direct Known Subclasses:
IaikGSIBaseSocket

public abstract class GSIBaseSocket
extends java.net.Socket


Field Summary
protected  Authorization authorization
           
protected  GlobusProxy credentials
           
protected  boolean encryption
           
protected  boolean init
           
protected  java.net.Socket socket
           
protected  java.security.cert.X509Certificate[] trustedCerts
           
 
Constructor Summary
protected GSIBaseSocket()
           
protected GSIBaseSocket(java.net.Socket socket)
           
 
Method Summary
 void authorize()
           
 void close()
           
protected  void doGSI()
           
 void enableEncryption(boolean enableEnc)
           
 Authorization getAuthorization()
           
abstract  java.lang.String getCipherSuite()
           
 GlobusProxy getCredentials()
           
 java.net.InetAddress getInetAddress()
           
 java.io.InputStream getInputStream()
           
 java.net.InetAddress getLocalAddress()
           
 int getLocalPort()
           
 java.io.OutputStream getOutputStream()
           
abstract  java.security.cert.X509Certificate[] getPeerCertificateChain()
           
 int getPort()
           
 java.security.cert.X509Certificate[] getTrustedCertificates()
           
abstract  GlobusProxy handleDelegation()
          Handles the delegation process.
 boolean isEncryptionEnabled()
           
abstract  java.security.cert.X509Certificate performDelegation(int delegationType)
           
 void performNoDelegation()
           
 void setAuthorization(Authorization auth)
           
 void setCredentials(GlobusProxy credentials)
           
protected  void setSocket(java.net.Socket socket)
           
 void setTcpNoDelay(boolean on)
           
 void setTrustedCertificates(java.security.cert.X509Certificate[] trustedCerts)
           
abstract  void setUseClientMode(boolean mode)
           
 
Methods inherited from class java.net.Socket
bind, connect, connect, getChannel, getKeepAlive, getLocalSocketAddress, getOOBInline, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTrafficClass, shutdownInput, shutdownOutput, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

init

protected boolean init

socket

protected java.net.Socket socket

authorization

protected Authorization authorization

credentials

protected GlobusProxy credentials

trustedCerts

protected java.security.cert.X509Certificate[] trustedCerts

encryption

protected boolean encryption
Constructor Detail

GSIBaseSocket

protected GSIBaseSocket()

GSIBaseSocket

protected GSIBaseSocket(java.net.Socket socket)
Method Detail

setSocket

protected void setSocket(java.net.Socket socket)

setCredentials

public void setCredentials(GlobusProxy credentials)

getCredentials

public GlobusProxy getCredentials()

setAuthorization

public void setAuthorization(Authorization auth)

getAuthorization

public Authorization getAuthorization()

setTrustedCertificates

public void setTrustedCertificates(java.security.cert.X509Certificate[] trustedCerts)

getTrustedCertificates

public java.security.cert.X509Certificate[] getTrustedCertificates()

enableEncryption

public void enableEncryption(boolean enableEnc)

isEncryptionEnabled

public boolean isEncryptionEnabled()

setUseClientMode

public abstract void setUseClientMode(boolean mode)
                               throws java.io.IOException
java.io.IOException

getCipherSuite

public abstract java.lang.String getCipherSuite()

getPeerCertificateChain

public abstract java.security.cert.X509Certificate[] getPeerCertificateChain()

performNoDelegation

public void performNoDelegation()
                         throws java.io.IOException
java.io.IOException

performDelegation

public abstract java.security.cert.X509Certificate performDelegation(int delegationType)
                                                              throws java.io.IOException
java.io.IOException

handleDelegation

public abstract GlobusProxy handleDelegation()
                                      throws java.io.IOException
Handles the delegation process. Implementation: It reads one character from the input stream of the socket. If this is a 'D', it handles delegation. Otherwise it simply returns null. Null indicates that delegation was not requested.

Returns:
GlobusProxy a GlobusProxy object, null if delegation was not requested.
java.io.IOException

authorize

public void authorize()
               throws java.io.IOException,
                      AuthorizationException
java.io.IOException
AuthorizationException

doGSI

protected void doGSI()
              throws java.io.IOException
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Overrides:
getInputStream in class java.net.Socket
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Overrides:
getOutputStream in class java.net.Socket
java.io.IOException

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.net.Socket
java.io.IOException

getPort

public int getPort()
Overrides:
getPort in class java.net.Socket

getLocalPort

public int getLocalPort()
Overrides:
getLocalPort in class java.net.Socket

getLocalAddress

public java.net.InetAddress getLocalAddress()
Overrides:
getLocalAddress in class java.net.Socket

getInetAddress

public java.net.InetAddress getInetAddress()
Overrides:
getInetAddress in class java.net.Socket

setTcpNoDelay

public void setTcpNoDelay(boolean on)
                   throws java.net.SocketException
Overrides:
setTcpNoDelay in class java.net.Socket
java.net.SocketException