All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.hylexus.jt.dashboard.server.registry.Jt808InstanceRegistry Maven / Gradle / Ivy

The newest version!
package io.github.hylexus.jt.dashboard.server.registry;

import io.github.hylexus.jt.core.registry.RegistryStore;
import io.github.hylexus.jt.dashboard.server.model.dto.instance.JtRegistration;
import io.github.hylexus.jt.dashboard.server.model.values.instance.Jt808Instance;
import io.github.hylexus.jt.dashboard.server.proxy.InstanceIdGenerator;
import io.github.hylexus.jt.dashboard.server.service.JtInstanceStatusConverter;

import java.time.LocalDateTime;

public class Jt808InstanceRegistry extends InstanceRegistry {

    public Jt808InstanceRegistry(InstanceIdGenerator generator, RegistryStore store, JtInstanceStatusConverter instanceStatusConverter) {
        super(generator, store, instanceStatusConverter);
    }

    @Override
    protected Jt808Instance createInstance(String id, JtRegistration jtRegistration, LocalDateTime now) {
        final Jt808Instance instance = new Jt808Instance();
        instance.setInstanceId(id);
        instance.setRegistration(jtRegistration);
        instance.setCreatedAt(now);
        return instance;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy