Package org.jgroups.protocols
Class EncryptHeader
- java.lang.Object
-
- org.jgroups.Header
-
- org.jgroups.protocols.EncryptHeader
-
- All Implemented Interfaces:
Constructable<Header>
,SizeStreamable
,Streamable
public class EncryptHeader extends Header
- Since:
- 4.0
- Author:
- Bela Ban
-
-
Field Summary
Fields Modifier and Type Field Description static byte
FETCH_SHARED_KEY
static byte
INSTALL_KEYS
protected byte[]
iv
protected Address
server
protected byte
type
protected byte[]
version
-
Constructor Summary
Constructors Constructor Description EncryptHeader()
EncryptHeader(byte[] version)
EncryptHeader(byte type, byte[] version)
EncryptHeader(byte type, byte[] version, byte[] iv)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.Supplier<? extends Header>
create()
Creates an instance of the class implementing this interfaceshort
getMagicId()
Returns the magic-ID.byte[]
iv()
void
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedint
serializedSize()
Returns the size (in bytes) of the marshalled objectAddress
server()
EncryptHeader
server(Address s)
java.lang.String
toString()
byte
type()
protected static java.lang.String
typeToString(byte type)
byte[]
version()
void
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
-
-
-
Field Detail
-
INSTALL_KEYS
public static final byte INSTALL_KEYS
- See Also:
- Constant Field Values
-
FETCH_SHARED_KEY
public static final byte FETCH_SHARED_KEY
- See Also:
- Constant Field Values
-
type
protected byte type
-
version
protected byte[] version
-
server
protected Address server
-
iv
protected byte[] iv
-
-
Method Detail
-
type
public byte type()
-
version
public byte[] version()
-
server
public Address server()
-
iv
public byte[] iv()
-
server
public EncryptHeader server(Address s)
-
getMagicId
public short getMagicId()
Description copied from class:Header
Returns the magic-ID. If defined in jg-magic-map.xml, the IDs need to be the same- Specified by:
getMagicId
in classHeader
-
create
public java.util.function.Supplier<? extends Header> create()
Description copied from interface:Constructable
Creates an instance of the class implementing this interface
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundException
Description copied from interface:Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamable
Returns the size (in bytes) of the marshalled object
-
typeToString
protected static java.lang.String typeToString(byte type)
-
-