public abstract class SaslWrapper
extends java.lang.Object
Constructor and Description |
---|
SaslWrapper() |
Modifier and Type | Method and Description |
---|---|
static SaslWrapper |
create(javax.security.sasl.SaslClient saslClient)
Create a SASL wrapper for a SASL client.
|
static SaslWrapper |
create(javax.security.sasl.SaslServer saslServer)
Create a SASL wrapper for a SASL server.
|
byte[] |
unwrap(byte[] bytes)
Unwrap a message.
|
abstract byte[] |
unwrap(byte[] bytes,
int off,
int len)
Unwrap a message.
|
abstract byte[] |
unwrap(java.nio.ByteBuffer source)
Unwrap a message.
|
void |
unwrap(java.nio.ByteBuffer destination,
java.nio.ByteBuffer source)
Unwrap a message.
|
byte[] |
wrap(byte[] bytes)
Wrap a message.
|
abstract byte[] |
wrap(byte[] bytes,
int off,
int len)
Wrap a message.
|
abstract byte[] |
wrap(java.nio.ByteBuffer source)
Wrap a message.
|
void |
wrap(java.nio.ByteBuffer destination,
java.nio.ByteBuffer source)
Wrap a message.
|
public abstract byte[] wrap(byte[] bytes, int off, int len) throws javax.security.sasl.SaslException
bytes
- the incoming messageoff
- the offset into the byte arraylen
- the length of the byte array to wrapjavax.security.sasl.SaslException
- if a problem occurspublic final byte[] wrap(byte[] bytes) throws javax.security.sasl.SaslException
bytes
- the incoming messagejavax.security.sasl.SaslException
- if a problem occurspublic abstract byte[] wrap(java.nio.ByteBuffer source) throws javax.security.sasl.SaslException
source
- the buffer from which bytes should be readjavax.security.sasl.SaslException
- if a problem occurspublic abstract byte[] unwrap(byte[] bytes, int off, int len) throws javax.security.sasl.SaslException
bytes
- the incoming messageoff
- the offset into the byte arraylen
- the length of the byte array to wrapjavax.security.sasl.SaslException
- if a problem occurspublic final byte[] unwrap(byte[] bytes) throws javax.security.sasl.SaslException
bytes
- the incoming messagejavax.security.sasl.SaslException
- if a problem occurspublic abstract byte[] unwrap(java.nio.ByteBuffer source) throws javax.security.sasl.SaslException
source
- the buffer from which bytes should be readjavax.security.sasl.SaslException
- if a problem occurspublic final void wrap(java.nio.ByteBuffer destination, java.nio.ByteBuffer source) throws javax.security.sasl.SaslException
source
buffer should have its position and remaining length set to encompass exactly one SASL message
(without the length field). The SASL message itself does not encode any length information so it is up to the
protocol implementer to ensure that the message is properly framed.destination
- the buffer into which bytes should be writtensource
- the buffers from which bytes should be readjavax.security.sasl.SaslException
- if a SASL error occursSaslClient.wrap(byte[], int, int)
,
SaslServer.wrap(byte[], int, int)
public final void unwrap(java.nio.ByteBuffer destination, java.nio.ByteBuffer source) throws javax.security.sasl.SaslException
The source
buffer should have its position and remaining length set to encompass exactly one SASL
message (without the length field). The SASL message itself does not encode any length information so it is up
to the protocol implementer to ensure that the message is properly framed.
destination
- the buffer into which bytes should be writtensource
- the buffers from which bytes should be readjavax.security.sasl.SaslException
- if a SASL error occursSaslClient.unwrap(byte[], int, int)
public static SaslWrapper create(javax.security.sasl.SaslClient saslClient)
saslClient
- the SASL clientpublic static SaslWrapper create(javax.security.sasl.SaslServer saslServer)
saslServer
- the SASL serverCopyright © 2016 JBoss, a division of Red Hat, Inc.