Skip to content

Commit

Permalink
update: serialization and reflect config
Browse files Browse the repository at this point in the history
  • Loading branch information
pvlugter committed Oct 9, 2023
1 parent 3eb50ae commit 23fc027
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public State(
}
}

public static final class WaitingDelivery {
public static final class WaitingDelivery implements CborSerializable {
public final String deliveryId;
public final Coordinates from;
public final Coordinates to;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public static final class ReportPosition implements Command {
public final Position position;
public final ActorRef<Done> replyTo;

@JsonCreator
public ReportPosition(Position position, ActorRef<Done> replyTo) {
this.position = position;
this.replyTo = replyTo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package local.drones;

import akka.serialization.jackson.CborSerializable;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Objects;

public final class Position implements CborSerializable {
public final Coordinates coordinates;
public final double altitude;

@JsonCreator
public Position(Coordinates coordinates, double altitude) {
this.coordinates = coordinates;
this.altitude = altitude;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4434,6 +4434,30 @@
}
]
},
{
"name": "local.drones.DeliveriesQueue$Command",
"queryAllDeclaredMethods": true
},
{
"name": "local.drones.DeliveriesQueue$CompleteDelivery",
"allDeclaredFields": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"fields": [
{
"name": "MODULE$"
}
],
"methods": [
{
"name": "<init>",
"parameterTypes": [
"java.lang.String",
"akka.actor.typed.ActorRef"
]
}
]
},
{
"name": "local.drones.DeliveriesQueue$DeliveryInProgress",
"allDeclaredFields": true,
Expand All @@ -4455,6 +4479,46 @@
}
]
},
{
"name": "local.drones.DeliveriesQueue$GetCurrentState",
"allDeclaredFields": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"fields": [
{
"name": "MODULE$"
}
],
"methods": [
{
"name": "<init>",
"parameterTypes": [
"akka.actor.typed.ActorRef"
]
}
]
},
{
"name": "local.drones.DeliveriesQueue$RequestDelivery",
"allDeclaredFields": true,
"queryAllDeclaredMethods": true,
"queryAllDeclaredConstructors": true,
"fields": [
{
"name": "MODULE$"
}
],
"methods": [
{
"name": "<init>",
"parameterTypes": [
"java.lang.String",
"local.drones.Coordinates",
"akka.actor.typed.ActorRef"
]
}
]
},
{
"name": "local.drones.DeliveriesQueue$State",
"allDeclaredFields": true,
Expand Down

0 comments on commit 23fc027

Please sign in to comment.