javax.net.ssl
Class SSLEngineResult

java.lang.Object
  extended by javax.net.ssl.SSLEngineResult

public class SSLEngineResult
extends Object

A result from an SSLEngine wrap or unwrap operation. This class conveys a possibly intermediate result, and may ask for more input data or request that output data be sent over a connection.


Nested Class Summary
static class SSLEngineResult.HandshakeStatus
          An enumeration of possible handshake status states.
static class SSLEngineResult.Status
          An enumeration of possible general states.
 
Constructor Summary
SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)
          Creates a new SSL engine result.
 
Method Summary
 int bytesConsumed()
          Returns the number of bytes consumed by the previous operation.
 int bytesProduced()
          Returns the number of bytes produced by the previous operation.
 SSLEngineResult.HandshakeStatus getHandshakeStatus()
          Returns the handshake status.
 SSLEngineResult.Status getStatus()
          Returns the connection status.
 String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SSLEngineResult

public SSLEngineResult(SSLEngineResult.Status status,
                       SSLEngineResult.HandshakeStatus handshakeStatus,
                       int bytesConsumed,
                       int bytesProduced)
Creates a new SSL engine result.

Parameters:
status - The status of the SSL connection.
handshakeStatus - The status of the SSL handshake.
bytesConsumed - The number of bytes consumed by the previous operation.
bytesProduced - The number of bytes produced by the previous operation.
Throws:
IllegalArgumentException - If either enum value is null, or if either integer is negative.
Method Detail

bytesConsumed

public int bytesConsumed()
Returns the number of bytes consumed by the previous operation.

Returns:
The number of bytes consumed.

bytesProduced

public int bytesProduced()
Returns the number of bytes produced by the previous operation.

Returns:
The number of bytes produced.

getHandshakeStatus

public SSLEngineResult.HandshakeStatus getHandshakeStatus()
Returns the handshake status.

Returns:
The handshake status.

getStatus

public SSLEngineResult.Status getStatus()
Returns the connection status.

Returns:
The connection status.

toString

public String toString()
Description copied from class: Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() and such.

It is typical, but not required, to ensure that this method never completes abruptly with a RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).

Overrides:
toString in class Object
Returns:
the String representing this Object, which may be null
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)