Class AuthorizationPacket
java.lang.Object
eu.cloudnetservice.driver.network.protocol.BasePacket
eu.cloudnetservice.driver.impl.network.standard.AuthorizationPacket
- All Implemented Interfaces:
eu.cloudnetservice.driver.network.protocol.Packet
public final class AuthorizationPacket
extends eu.cloudnetservice.driver.network.protocol.BasePacket
The packet which is used for authorization between:
- A wrapper and a node.
- A node and a node.
This packet holds all information which is required for a node to determine all information needed for a successful authentication. When authenticating a wrapper with a node this packet contains:
- The connection key assigned to the service by the node when starting the service.
- The service id of the service which connects to the node.
When authenticating a node with a node this packet contains:
- The cluster id
- The network cluster node (offline information) of the node.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe type of authorization used to determine which type of component is connecting and which information is required for a successful auth. -
Field Summary
Fields inherited from class eu.cloudnetservice.driver.network.protocol.BasePacket
channel, creationStamp, dataBuf, prioritized, uniqueId -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationPacket(@NonNull AuthorizationPacket.PacketAuthorizationType type, @NonNull eu.cloudnetservice.driver.network.buffer.DataBuf dataBuf) Constructs a new authorization packet. -
Method Summary
Methods inherited from class eu.cloudnetservice.driver.network.protocol.BasePacket
canEqual, channel, constructResponse, content, creation, equals, hashCode, prioritized, readable, toString, uniqueId, uniqueId
-
Constructor Details
-
AuthorizationPacket
public AuthorizationPacket(@NonNull @NonNull AuthorizationPacket.PacketAuthorizationType type, @NonNull @NonNull eu.cloudnetservice.driver.network.buffer.DataBuf dataBuf) Constructs a new authorization packet.- Parameters:
type- the requested type of authorization.dataBuf- the data for the authorization which are required for the given type.- Throws:
NullPointerException- if either the type or data buf is null.
-