public synchronized void setReconnectDelay (long delay) { getPersist().getChild ("reconnect-delay") .setText (Long.toString (delay)); this.delay = delay; setModified (true); } public long getReconnectDelay () {
public synchronized void setOutQueue (String out) { this.out = out; getPersist().getChild("out").setText (out); setModified (true); }
protected void initSpaceAndQueues () throws ConfigurationException { Element persist = getPersist (); sp = grabSpace (persist.getChild ("space")); in = persist.getChildTextTrim ("in"); out = persist.getChildTextTrim ("out"); writeOnly = "yes".equalsIgnoreCase (getPersist().getChildTextTrim ("write-only")); if (in == null || (out == null && !writeOnly)) { throw new ConfigurationException ("Misconfigured channel. Please verify in/out queues"); } String s = persist.getChildTextTrim ("reconnect-delay"); delay = s != null ? Long.parseLong (s) : 10000; // reasonable default keepAlive = "yes".equalsIgnoreCase (persist.getChildTextTrim ("keep-alive")); ignoreISOExceptions = "yes".equalsIgnoreCase (persist.getChildTextTrim ("ignore-iso-exceptions")); String t = persist.getChildTextTrim("timeout"); timeout = t != null && t.length() > 0 ? Long.parseLong(t) : 0l; ready = getName() + ".ready"; reconnect = getName() + ".reconnect"; waitForWorkersOnStop = "yes".equalsIgnoreCase(persist.getChildTextTrim ("wait-for-workers-on-stop")); }
public synchronized void setInQueue (String in) { String old = this.in; this.in = in; if (old != null) sp.out (old, Boolean.TRUE); getPersist().getChild("in").setText (in); setModified (true); } public String getInQueue () {
protected ISOChannel initChannel () throws ConfigurationException { Element persist = getPersist (); Element e = persist.getChild ("channel"); if (e == null) throw new ConfigurationException ("channel element missing"); ISOChannel c = newChannel (e, getFactory()); String socketFactoryString = getSocketFactory(); if (socketFactoryString != null && c instanceof FactoryChannel) { ISOClientSocketFactory sFac = (ISOClientSocketFactory) getFactory().newInstance(socketFactoryString); if (sFac != null && sFac instanceof LogSource) { ((LogSource) sFac).setLogger(log.getLogger(),getName() + ".socket-factory"); } getFactory().setConfiguration (sFac, e); ((FactoryChannel)c).setSocketFactory(sFac); } return c; } protected void initSpaceAndQueues () throws ConfigurationException {