001package jmri.jmrix.roco.z21; 002 003import org.slf4j.Logger; 004import org.slf4j.LoggerFactory; 005 006/** 007 * Handle configuring the XpressNet tunnel for the z21 Connection. 008 * <p> 009 * This uses the {@link Z21XNetStreamPortController} class to do the actual 010 * connection. 011 * 012 * @author Bob Jacobsen Copyright (C) 2001, 2003 013 * @author Paul Bender Copyright (C) 2015 014 * 015 * @see Z21XNetStreamPortController 016 */ 017public class Z21XNetConnectionConfig extends jmri.jmrix.AbstractStreamConnectionConfig { 018 019 /** 020 * Ctor for an object being created during load process; Swing init is 021 * deferred. 022 * @param p stream port controller. 023 */ 024 public Z21XNetConnectionConfig(jmri.jmrix.AbstractStreamPortController p) { 025 super(p); 026 } 027 028 /** 029 * Ctor for a connection configuration with no preexisting adapter. 030 * {@link #setInstance()} will fill the adapter member. 031 */ 032 public Z21XNetConnectionConfig() { 033 super(); 034 } 035 036 @Override 037 public String name() { 038 return "Z21 XpressNet Stream"; 039 } 040 041 String manufacturerName = "Roco"; 042 043 @Override 044 public String getManufacturer() { 045 return manufacturerName; 046 } 047 048 @Override 049 public void setManufacturer(String manu) { 050 manufacturerName = manu; 051 } 052 053 /** 054 * {@inheritDoc} 055 */ 056 @Override 057 protected void setInstance() { 058 log.error("Unexpected call to setInstance"); 059 } 060 061 /** 062 * Determine if configuration needs to be written to disk. 063 * 064 * this implementation always returns false. 065 * 066 * @return true if configuration need to be saved, false otherwise 067 */ 068 @Override 069 public boolean isDirty() { 070 return false; 071 } 072 073 private static final Logger log = LoggerFactory.getLogger(Z21XNetConnectionConfig.class); 074 075}