Package org.globus.gsi.gssapi.net
Class GssSocket
java.lang.Object
java.net.Socket
org.globus.net.WrappedSocket
org.globus.gsi.gssapi.net.GssSocket
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
GSIGssSocket
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Authorization
protected boolean
protected GSSContext
static final int
protected InputStream
protected int
protected OutputStream
static final int
Fields inherited from class org.globus.net.WrappedSocket
socket
-
Constructor Summary
ConstructorsConstructorDescriptionGssSocket
(String host, int port, GSSContext context) GssSocket
(Socket socket, GSSContext context) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
void
close()
Disposes of the context and closes the connectionboolean
int
protected abstract byte[]
void
void
setUseClientMode
(boolean clientMode) void
setWrapMode
(int mode) void
protected abstract void
writeToken
(byte[] token) Methods inherited from class org.globus.net.WrappedSocket
getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getPort, getReceiveBufferSize, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getWrappedSocket, setKeepAlive, setReceiveBufferSize, setSendBufferSize, setSoLinger, setSoTimeout, setTcpNoDelay, shutdownInput, shutdownOutput, toString
Methods inherited from class java.net.Socket
bind, connect, connect, getChannel, getLocalSocketAddress, getOOBInline, getOption, getRemoteSocketAddress, getReuseAddress, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setOption, setPerformancePreferences, setReuseAddress, setSocketImplFactory, setTrafficClass, supportedOptions
-
Field Details
-
context
-
clientMode
protected boolean clientMode -
in
-
out
-
authorization
-
SSL_MODE
public static final int SSL_MODE- See Also:
-
GSI_MODE
public static final int GSI_MODE- See Also:
-
mode
protected int mode
-
-
Constructor Details
-
GssSocket
- Throws:
IOException
-
GssSocket
-
-
Method Details
-
setAuthorization
-
getAuthorization
-
setUseClientMode
public void setUseClientMode(boolean clientMode) -
getClientMode
public boolean getClientMode() -
setWrapMode
public void setWrapMode(int mode) -
getWrapMode
public int getWrapMode() -
getContext
-
writeToken
- Throws:
IOException
-
readToken
- Throws:
IOException
-
authenticateClient
- Throws:
IOException
GSSException
-
authenticateServer
- Throws:
IOException
GSSException
-
startHandshake
- Throws:
IOException
-
getOutputStream
- Overrides:
getOutputStream
in classWrappedSocket
- Throws:
IOException
-
getInputStream
- Overrides:
getInputStream
in classWrappedSocket
- Throws:
IOException
-
close
Disposes of the context and closes the connection- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classWrappedSocket
- Throws:
IOException
-