public class ChannelOptions
extends java.lang.Object
Channel or Channel object,
such as encryption, ChannelMode and channel parameters.| Modifier and Type | Field and Description |
|---|---|
java.lang.Object |
cipherParams
Requests encryption for this channel when not null,
and specifies encryption-related parameters (such as algorithm, chaining mode, key length and key).
|
boolean |
encrypted
Whether or not this ChannelOptions is encrypted.
|
ChannelMode[] |
modes
An array of
ChannelMode objects. |
java.util.Map<java.lang.String,java.lang.String> |
params
Channel Parameters
that configure the behavior of the channel.
|
| Constructor and Description |
|---|
ChannelOptions() |
| Modifier and Type | Method and Description |
|---|---|
static ChannelOptions |
fromCipherKey(byte[] key)
Deprecated.
|
static ChannelOptions |
fromCipherKey(java.lang.String base64Key)
Deprecated.
|
Crypto.CipherParams |
getCipherParamsOrDefault()
Internal; returns cipher params or generate default
|
int |
getModeFlags() |
boolean |
hasModes() |
boolean |
hasParams() |
static ChannelOptions |
withCipherKey(byte[] key)
Constructor withCipherKey, that takes a key only.
|
static ChannelOptions |
withCipherKey(java.lang.String base64Key)
Constructor withCipherKey, that takes a key only.
|
public java.util.Map<java.lang.String,java.lang.String> params
Spec: TB2c
public ChannelMode[] modes
ChannelMode objects.
Spec: TB2d
public java.lang.Object cipherParams
Spec: RSL5a, TB2b
public boolean encrypted
public boolean hasModes()
public boolean hasParams()
public int getModeFlags()
@Deprecated public static ChannelOptions fromCipherKey(byte[] key) throws AblyException
key - Byte array cipher key.AblyException - If something goes wrong.@Deprecated public static ChannelOptions fromCipherKey(java.lang.String base64Key) throws AblyException
base64Key - The cipher key as a base64-encoded String,AblyException - If something goes wrong.public static ChannelOptions withCipherKey(byte[] key) throws AblyException
Spec: TB3
key - A private key used to encrypt and decrypt payloads.AblyException - If something goes wrong.public static ChannelOptions withCipherKey(java.lang.String base64Key) throws AblyException
Spec: TB3
base64Key - A private key used to encrypt and decrypt payloads.AblyException - If something goes wrong.public Crypto.CipherParams getCipherParamsOrDefault() throws AblyException
AblyException