001package jmri.jmrix.bidib.tcpserver;
002
003import java.util.Locale;
004import jmri.util.startup.AbstractStartupActionFactory;
005import jmri.util.startup.StartupActionFactory;
006import org.openide.util.lookup.ServiceProvider;
007
008/**
009 * Factory for BiDiB TCP server startup actions.
010 * 
011 * @author Randall Wood Copyright 2020
012 * @author Eckart Meyer Copyright (C) 2023
013 */
014@ServiceProvider(service = StartupActionFactory.class)
015public final class TcpServerStartupActionFactory extends AbstractStartupActionFactory {
016
017    @Override
018    public String getTitle(Class<?> clazz, Locale locale) throws IllegalArgumentException {
019        if (clazz.equals(TcpServerAction.class)) {
020            //return Bundle.getMessage(locale, "StartupServerAction");
021            return "Start BiDiB over TCP Server";
022        }
023        throw new IllegalArgumentException(clazz.getName() + " is not supported by " + this.getClass().getName());
024    }
025
026    @Override
027    public Class<?>[] getActionClasses() {
028        return new Class[]{TcpServerAction.class};
029    }
030
031}