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 byteFETCH_SHARED_KEYstatic byteINSTALL_KEYSprotected byte[]ivprotected Addressserverprotected bytetypeprotected 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 interfaceshortgetMagicId()Returns the magic-ID.byte[]iv()voidreadFrom(java.io.DataInput in)Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedintserializedSize()Returns the size (in bytes) of the marshalled objectAddressserver()EncryptHeaderserver(Address s)java.lang.StringtoString()bytetype()protected static java.lang.StringtypeToString(byte type)byte[]version()voidwriteTo(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:HeaderReturns the magic-ID. If defined in jg-magic-map.xml, the IDs need to be the same- Specified by:
getMagicIdin classHeader
-
create
public java.util.function.Supplier<? extends Header> create()
Description copied from interface:ConstructableCreates an instance of the class implementing this interface
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOExceptionDescription copied from interface:StreamableWrite 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.ClassNotFoundExceptionDescription copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object
-
typeToString
protected static java.lang.String typeToString(byte type)
-
-