Java Globus API: Class GssSocket

org.globus.gsi.gssapi.net
Class GssSocket

java.lang.Object
  |
  +--java.net.Socket
        |
        +--org.globus.gsi.gssapi.net.GssSocket
Direct Known Subclasses:
GSIGssSocket

public abstract class GssSocket
extends Socket


Field Summary
protected  Authorization authorization
           
protected  boolean clientMode
           
protected  GSSContext context
           
static int GSI_MODE
           
protected  InputStream in
           
protected  int mode
           
protected  OutputStream out
           
protected  Socket socket
           
static int SSL_MODE
           
 
Constructor Summary
GssSocket(Socket socket, GSSContext context)
           
GssSocket(String host, int port, GSSContext context)
           
 
Method Summary
protected  void authenticateClient()
           
protected  void authenticateServer()
           
 void close()
          Disposes of the context and closes the connection
 Authorization getAuthorization()
           
 boolean getClientMode()
           
 GSSContext getContext()
           
 InetAddress getInetAddress()
           
 InputStream getInputStream()
           
 boolean getKeepAlive()
           
 InetAddress getLocalAddress()
           
 int getLocalPort()
           
 OutputStream getOutputStream()
           
 int getPort()
           
 int getReceiveBufferSize()
           
 int getSendBufferSize()
           
 int getSoLinger()
           
 int getSoTimeout()
           
 boolean getTcpNoDelay()
           
 int getWrapMode()
           
protected abstract  byte[] readToken()
           
 void setAuthorization(Authorization auth)
           
 void setKeepAlive(boolean on)
           
 void setReceiveBufferSize(int size)
           
 void setSendBufferSize(int size)
           
 void setSoLinger(boolean on, int linger)
           
 void setSoTimeout(int timeout)
           
 void setTcpNoDelay(boolean on)
           
 void setUseClientMode(boolean clientMode)
           
 void setWrapMode(int mode)
           
 void shutdownInput()
           
 void shutdownOutput()
           
 void startHandshake()
           
 String toString()
           
protected abstract  void writeToken(byte[] token)
           
 
Methods inherited from class java.net.Socket
setSocketImplFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

context

protected GSSContext context

socket

protected Socket socket

clientMode

protected boolean clientMode

in

protected InputStream in

out

protected OutputStream out

authorization

protected Authorization authorization

SSL_MODE

public static final int SSL_MODE

GSI_MODE

public static final int GSI_MODE

mode

protected int mode
Constructor Detail

GssSocket

public GssSocket(String host,
                 int port,
                 GSSContext context)
          throws IOException

GssSocket

public GssSocket(Socket socket,
                 GSSContext context)
Method Detail

setAuthorization

public void setAuthorization(Authorization auth)

getAuthorization

public Authorization getAuthorization()

setUseClientMode

public void setUseClientMode(boolean clientMode)

getClientMode

public boolean getClientMode()

setWrapMode

public void setWrapMode(int mode)

getWrapMode

public int getWrapMode()

getContext

public GSSContext getContext()

writeToken

protected abstract void writeToken(byte[] token)
                            throws IOException

readToken

protected abstract byte[] readToken()
                             throws IOException

authenticateClient

protected void authenticateClient()
                           throws IOException,
                                  GSSException

authenticateServer

protected void authenticateServer()
                           throws IOException,
                                  GSSException

startHandshake

public void startHandshake()
                    throws IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Overrides:
getOutputStream in class Socket

getInputStream

public InputStream getInputStream()
                           throws IOException
Overrides:
getInputStream in class Socket

close

public void close()
           throws IOException
Disposes of the context and closes the connection
Overrides:
close in class Socket

getInetAddress

public InetAddress getInetAddress()
Overrides:
getInetAddress in class Socket

getKeepAlive

public boolean getKeepAlive()
                     throws SocketException
Overrides:
getKeepAlive in class Socket

getLocalAddress

public InetAddress getLocalAddress()
Overrides:
getLocalAddress in class Socket

getLocalPort

public int getLocalPort()
Overrides:
getLocalPort in class Socket

getPort

public int getPort()
Overrides:
getPort in class Socket

getReceiveBufferSize

public int getReceiveBufferSize()
                         throws SocketException
Overrides:
getReceiveBufferSize in class Socket

getSendBufferSize

public int getSendBufferSize()
                      throws SocketException
Overrides:
getSendBufferSize in class Socket

getSoLinger

public int getSoLinger()
                throws SocketException
Overrides:
getSoLinger in class Socket

getSoTimeout

public int getSoTimeout()
                 throws SocketException
Overrides:
getSoTimeout in class Socket

getTcpNoDelay

public boolean getTcpNoDelay()
                      throws SocketException
Overrides:
getTcpNoDelay in class Socket

setKeepAlive

public void setKeepAlive(boolean on)
                  throws SocketException
Overrides:
setKeepAlive in class Socket

setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws SocketException
Overrides:
setReceiveBufferSize in class Socket

setSendBufferSize

public void setSendBufferSize(int size)
                       throws SocketException
Overrides:
setSendBufferSize in class Socket

setSoLinger

public void setSoLinger(boolean on,
                        int linger)
                 throws SocketException
Overrides:
setSoLinger in class Socket

setSoTimeout

public void setSoTimeout(int timeout)
                  throws SocketException
Overrides:
setSoTimeout in class Socket

setTcpNoDelay

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

shutdownInput

public void shutdownInput()
                   throws IOException
Overrides:
shutdownInput in class Socket

shutdownOutput

public void shutdownOutput()
                    throws IOException
Overrides:
shutdownOutput in class Socket

toString

public String toString()
Overrides:
toString in class Socket