Package org.jgroups.protocols
Class SaslHeader
- java.lang.Object
-
- org.jgroups.Header
-
- org.jgroups.protocols.SaslHeader
-
- All Implemented Interfaces:
Constructable<Header>,SizeStreamable,Streamable
public class SaslHeader extends Header
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSaslHeader.Type
-
Constructor Summary
Constructors Constructor Description SaslHeader()SaslHeader(SaslHeader.Type type, byte[] payload)
-
Method Summary
All 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[]getPayload()SaslHeader.TypegetType()SaslHeaderpayload(byte[] payload)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 objectvoidsetPayload(byte[] payload)voidsetType(SaslHeader.Type type)byte[]token()java.lang.StringtoString()SaslHeadertype(SaslHeader.Type type)voidwriteTo(java.io.DataOutput out)Write the entire state of the current object (including superclasses) to outstream.
-
-
-
Constructor Detail
-
SaslHeader
public SaslHeader()
-
SaslHeader
public SaslHeader(SaslHeader.Type type, byte[] payload)
-
-
Method Detail
-
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
-
getPayload
public byte[] getPayload()
-
setPayload
public void setPayload(byte[] payload)
-
getType
public SaslHeader.Type getType()
-
setType
public void setType(SaslHeader.Type type)
-
payload
public SaslHeader payload(byte[] payload)
-
token
public byte[] token()
-
type
public SaslHeader type(SaslHeader.Type type)
-
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.IOExceptionDescription 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.IOException
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object
-
-