Class Wire
java.lang.Object
dev.moonbridge.backendchannel.Wire
Authentication and control-frame codecs for the backend connection. Business messages use MessageCodec.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]canonicalRegistration(String instanceId, String name, String address, String generation, String keyId) Canonical HMAC input after the server nonce: five length-prefixed UTF-8 strings.static Wire.HellodecodeHello(byte[] frame) static Wire.RegistrationdecodeRegister(byte[] frame) static longdecodeRegistered(byte[] frame) static Wire.RegisteredIdentitydecodeRegisteredIdentity(byte[] frame) static UUIDdecodeRegisteredProxyEpoch(byte[] frame) static byte[]empty(int type) static byte[]hello(int version, byte[] nonce) static byte[]register(String instanceId, String name, String address, String generation, String keyId, byte[] signature) static byte[]registered(long epoch) static byte[]registered(long epoch, UUID proxyEpoch) static voidvalidateEmpty(byte[] frame, int type)
-
Field Details
-
VERSION
public static final int VERSION- See Also:
-
HELLO
public static final int HELLO- See Also:
-
REGISTER
public static final int REGISTER- See Also:
-
REGISTERED
public static final int REGISTERED- See Also:
-
HEARTBEAT
public static final int HEARTBEAT- See Also:
-
PONG
public static final int PONG- See Also:
-
GOODBYE
public static final int GOODBYE- See Also:
-
NONCE_BYTES
public static final int NONCE_BYTES- See Also:
-
MAX_FRAME_BYTES
public static final int MAX_FRAME_BYTES- See Also:
-
MAX_STRING_BYTES
public static final int MAX_STRING_BYTES- See Also:
-
-
Method Details
-
hello
- Throws:
IOException
-
decodeHello
- Throws:
IOException
-
register
public static byte[] register(String instanceId, String name, String address, String generation, String keyId, byte[] signature) throws IOException - Throws:
IOException
-
canonicalRegistration
public static byte[] canonicalRegistration(String instanceId, String name, String address, String generation, String keyId) throws IOException Canonical HMAC input after the server nonce: five length-prefixed UTF-8 strings.- Throws:
IOException
-
decodeRegister
- Throws:
IOException
-
registered
- Throws:
IOException
-
registered
- Throws:
IOException
-
decodeRegistered
- Throws:
IOException
-
decodeRegisteredProxyEpoch
- Throws:
IOException
-
decodeRegisteredIdentity
- Throws:
IOException
-
empty
- Throws:
IOException
-
validateEmpty
- Throws:
IOException
-