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 class
SaslHeader.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 interfaceshort
getMagicId()
Returns the magic-ID.byte[]
getPayload()
SaslHeader.Type
getType()
SaslHeader
payload(byte[] payload)
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 objectvoid
setPayload(byte[] payload)
void
setType(SaslHeader.Type type)
byte[]
token()
java.lang.String
toString()
SaslHeader
type(SaslHeader.Type type)
void
writeTo(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:Header
Returns the magic-ID. If defined in jg-magic-map.xml, the IDs need to be the same- Specified by:
getMagicId
in 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: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
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
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamable
Returns the size (in bytes) of the marshalled object
-
-