static class KerberosUtil.Connection extends Object
Modifier and Type | Field and Description |
---|---|
(package private) KerberosPrincipal |
clientPrincipal
client principal of this connection
|
protected Logger |
connectionLogger
logger of the connection
|
protected DataInputStream |
dis
Input stream provided by the underlying socket
|
protected boolean |
doDelegation
If this field is set to true, the initiator's credentials
will be delegated to the acceptor during GSS context
establishment.
|
protected boolean |
doEncryption
Boolean to indicate whether traffic will be encrypted
|
protected DataOutputStream |
dos
Output stream provided by the underlying socket
|
protected GSSContext |
gssContext
GSSContext instance used by this connection, it is
initialized in child class
|
protected static int |
INTEGRITY_QOP |
protected static int |
PRIVACY_QOP |
protected Socket |
sock
TCP socket used by this connection
|
Constructor and Description |
---|
KerberosUtil.Connection(Socket sock)
Construct a connection object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection
|
(package private) void |
flush()
Flush the output stream used for send.
|
(package private) byte[] |
read()
Block until a complete GSS token has been received, unwrap
it, and return its content.
|
(package private) void |
write(byte[] buf,
int offset,
int len)
Wrap the content of the buffer into a GSS token and write
it out to the underlying socket.
|
protected static final int INTEGRITY_QOP
protected static final int PRIVACY_QOP
protected final Socket sock
protected DataInputStream dis
protected DataOutputStream dos
KerberosPrincipal clientPrincipal
protected GSSContext gssContext
protected boolean doEncryption
protected boolean doDelegation
protected Logger connectionLogger
KerberosUtil.Connection(Socket sock) throws IOException
sock
- underlying socket used by this connectionIOException
public void close()
void write(byte[] buf, int offset, int len) throws IOException
buf
- the buffer whose content will be send outoffset
- offset marks the start of the content to be
sent outlen
- number of bytes to be sent outIOException
- if problems encounteredvoid flush() throws IOException
IOException
byte[] read() throws IOException
IOException
- if problems encounteredCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.