refactor: use stateless identity fallback
This commit is contained in:
@@ -3,7 +3,7 @@ package com.lingniu.ingest.inbound.mqtt.client;
|
||||
import com.lingniu.ingest.api.ProtocolId;
|
||||
import com.lingniu.ingest.api.pipeline.RawFrame;
|
||||
import com.lingniu.ingest.core.dispatcher.Dispatcher;
|
||||
import com.lingniu.ingest.identity.InMemoryVehicleIdentityService;
|
||||
import com.lingniu.ingest.identity.StatelessVehicleIdentityResolver;
|
||||
import com.lingniu.ingest.identity.VehicleIdentity;
|
||||
import com.lingniu.ingest.identity.VehicleIdentityLookup;
|
||||
import com.lingniu.ingest.identity.VehicleIdentityResolver;
|
||||
@@ -53,7 +53,7 @@ public final class MqttEndpointManager implements AutoCloseable {
|
||||
public MqttEndpointManager(MqttInboundProperties props,
|
||||
MqttProfileRegistry profileRegistry,
|
||||
Dispatcher dispatcher) {
|
||||
this(props, profileRegistry, new InMemoryVehicleIdentityService(), dispatcher);
|
||||
this(props, profileRegistry, new StatelessVehicleIdentityResolver(), dispatcher);
|
||||
}
|
||||
|
||||
public MqttEndpointManager(MqttInboundProperties props,
|
||||
@@ -62,7 +62,7 @@ public final class MqttEndpointManager implements AutoCloseable {
|
||||
Dispatcher dispatcher) {
|
||||
this.props = props;
|
||||
this.profileRegistry = profileRegistry;
|
||||
this.identityResolver = identityResolver == null ? new InMemoryVehicleIdentityService() : identityResolver;
|
||||
this.identityResolver = identityResolver == null ? new StatelessVehicleIdentityResolver() : identityResolver;
|
||||
this.dispatcher = dispatcher;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.lingniu.ingest.api.event.LocationPayload;
|
||||
import com.lingniu.ingest.api.event.RealtimePayload;
|
||||
import com.lingniu.ingest.api.event.VehicleEvent;
|
||||
import com.lingniu.ingest.api.spi.EventMapper;
|
||||
import com.lingniu.ingest.identity.InMemoryVehicleIdentityService;
|
||||
import com.lingniu.ingest.identity.StatelessVehicleIdentityResolver;
|
||||
import com.lingniu.ingest.identity.VehicleIdentity;
|
||||
import com.lingniu.ingest.identity.VehicleIdentityLookup;
|
||||
import com.lingniu.ingest.identity.VehicleIdentityResolver;
|
||||
@@ -31,11 +31,11 @@ public final class YutongEventMapper implements EventMapper<MqttPayload> {
|
||||
private final VehicleIdentityResolver identityResolver;
|
||||
|
||||
public YutongEventMapper() {
|
||||
this(new InMemoryVehicleIdentityService());
|
||||
this(new StatelessVehicleIdentityResolver());
|
||||
}
|
||||
|
||||
public YutongEventMapper(VehicleIdentityResolver identityResolver) {
|
||||
this.identityResolver = identityResolver == null ? new InMemoryVehicleIdentityService() : identityResolver;
|
||||
this.identityResolver = identityResolver == null ? new StatelessVehicleIdentityResolver() : identityResolver;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user