refactor: use stateless identity fallback
This commit is contained in:
@@ -5,7 +5,7 @@ import com.lingniu.ingest.api.annotation.EventEmit;
|
||||
import com.lingniu.ingest.api.annotation.MessageMapping;
|
||||
import com.lingniu.ingest.api.annotation.ProtocolHandler;
|
||||
import com.lingniu.ingest.api.event.VehicleEvent;
|
||||
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;
|
||||
@@ -25,11 +25,11 @@ public final class Jt1078MalformedRtpHandler {
|
||||
private final VehicleIdentityResolver identityResolver;
|
||||
|
||||
public Jt1078MalformedRtpHandler() {
|
||||
this(new InMemoryVehicleIdentityService());
|
||||
this(new StatelessVehicleIdentityResolver());
|
||||
}
|
||||
|
||||
public Jt1078MalformedRtpHandler(VehicleIdentityResolver identityResolver) {
|
||||
this.identityResolver = identityResolver == null ? new InMemoryVehicleIdentityService() : identityResolver;
|
||||
this.identityResolver = identityResolver == null ? new StatelessVehicleIdentityResolver() : identityResolver;
|
||||
}
|
||||
|
||||
@MessageMapping(command = Jt1078MediaMessageId.MALFORMED_RTP, desc = "JT1078 RTP 入口坏包兜底")
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.lingniu.ingest.protocol.jt1078.media;
|
||||
|
||||
import com.lingniu.ingest.api.ProtocolId;
|
||||
import com.lingniu.ingest.api.pipeline.RawFrame;
|
||||
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;
|
||||
@@ -19,12 +19,12 @@ public final class Jt1078MalformedRtpEventPublisher {
|
||||
private final Consumer<RawFrame> dispatcher;
|
||||
|
||||
public Jt1078MalformedRtpEventPublisher(Consumer<RawFrame> dispatcher) {
|
||||
this(new InMemoryVehicleIdentityService(), dispatcher);
|
||||
this(new StatelessVehicleIdentityResolver(), dispatcher);
|
||||
}
|
||||
|
||||
public Jt1078MalformedRtpEventPublisher(VehicleIdentityResolver identityResolver,
|
||||
Consumer<RawFrame> dispatcher) {
|
||||
this.identityResolver = identityResolver == null ? new InMemoryVehicleIdentityService() : identityResolver;
|
||||
this.identityResolver = identityResolver == null ? new StatelessVehicleIdentityResolver() : identityResolver;
|
||||
this.dispatcher = dispatcher;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user