public void addConnection(InboundConnection theCon) { Validate.notNull(theCon); myConnections.add(theCon); theCon.setController(myController); firePropertyChange(PROP_LIST, null, null); }
public static InboundConnectionList fromXml(Controller theController, String theXml) { InboundConnectionList retVal = JAXB.unmarshal(new StringReader(theXml), InboundConnectionList.class); retVal.myController = theController; for (InboundConnection next : retVal.getConnections()) { next.setController(theController); } return retVal; }
public InboundConnection createDefaultConnection(int port) { InboundConnection initialConnection = new InboundConnection(); initialConnection.setCharSet( Prefs.getInstance().getMostRecentConnectionCharset().displayName()); initialConnection.setDualPort(false); initialConnection.setIncomingOrSinglePort(port); initialConnection.setHost("localhost"); initialConnection.setEncoding(Hl7V2EncodingTypeEnum.ER_7); initialConnection.setController(myController); return initialConnection; }