method2testcases
stringlengths
118
6.63k
### Question: X25Channel extends BaseChannel { public void setHeader (byte[] header) { this.header = header; } X25Channel(); X25Channel(String host, int port, ISOPackager p); X25Channel(ISOPackager p); X25Channel(ISOPackager p, ServerSocket serverSocket); void disconnect(); void setHeader(byte[] header); void setHea...
### Question: ASCIIChannel extends BaseChannel { protected int getMessageLength() throws IOException, ISOException { int l = 0; byte[] b = new byte[lengthDigits]; while (l == 0) { serverIn.readFully(b, 0, lengthDigits); try { if ((l=Integer.parseInt(new String(b))) == 0) { serverOut.write(b); serverOut.flush(); } } cat...
### Question: ASCIIChannel extends BaseChannel { protected void sendMessageLength(int len) throws IOException { int maxLen= ten.pow(lengthDigits).intValue() - 1; if (len > maxLen) throw new IOException ("len exceeded ("+len+" > "+maxLen+")"); else if (len < 0) throw new IOException ("invalid negative length ("+len+")")...
### Question: Q2 implements FileFilter, Runnable { public void shutdown () { shutdown(false); } Q2(String[] args, BundleContext bundleContext); Q2(); Q2(String deployDir); Q2(String[] args); void start(); void stop(); void run(); void shutdown(); boolean running(); boolean ready(); boolean ready(long millis); void s...
### Question: BASE24Channel extends BaseChannel { protected void sendMessageTrailler(ISOMsg m, int len) throws IOException { serverOut.write (3); } BASE24Channel(); BASE24Channel(String host, int port, ISOPackager p); BASE24Channel(ISOPackager p); BASE24Channel(ISOPackager p, ServerSocket serverSocket); }### Answe...
### Question: BASE24Channel extends BaseChannel { protected byte[] streamReceive() throws IOException { int i; byte[] buf = new byte[4096]; for (i=0; i<4096; i++) { int c = serverIn.read(); if (c == 0x3) break; buf[i] = (byte) c; } if (i == 4096) throw new IOException("message too long"); byte[] d = new byte[i]; System...
### Question: PADChannel extends BaseChannel { public void setHeader (String header) { super.setHeader ( ISOUtil.hex2byte (header.getBytes(), 0, header.length() / 2) ); } PADChannel(); PADChannel(String host, int port, ISOPackager p); PADChannel(ISOPackager p); PADChannel(ISOPackager p, ServerSocket serverSocket); @...
### Question: BASE1Header extends BaseHeader { public String getDestination() { return ISOUtil.bcd2str (this.header, 5, 6, false); } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); void setHFormat(in...
### Question: BASE1Header extends BaseHeader { public int getFormat() { return header[2] & 0xFF; } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); void setHFormat(int hformat); int getFormat(); void ...
### Question: BASE1Header extends BaseHeader { public int getHLen() { return header[0] & 0xFF; } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); void setHFormat(int hformat); int getFormat(); void se...
### Question: BASE1Header extends BaseHeader { public String getRejectCode() { return isRejected() ? ISOUtil.bcd2str (this.header, 24, 4, false) : ""; } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen()...
### Question: BASE1Header extends BaseHeader { public String getSource() { return ISOUtil.bcd2str (this.header, 8, 6, false); } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); void setHFormat(int hfo...
### Question: BASE1Header extends BaseHeader { public boolean isRejected() { return getLength() >= 26 && (header[22] & 0x80) == 0x80; } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); void setHFormat...
### Question: BASE1Header extends BaseHeader { public void setBatchNumber(int i) { header[17] = (byte) (i & 0xFF); } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); void setHFormat(int hformat); int ...
### Question: UI extends QBeanSupport implements UIObjectFactory { public Object newInstance (String clazz) throws Exception { return getFactory().newInstance (clazz); } UI(); void startService(); void stopService(); Object newInstance(String clazz); }### Answer: @Test public void testNewInstanceThrowsNullPointerExcep...
### Question: BASE1Header extends BaseHeader { public void setDestination(String dest) { byte[] d = ISOUtil.str2bcd(dest, true); System.arraycopy(d, 0, header, 5, 3); } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header...
### Question: BASE1Header extends BaseHeader { public void setFlags(int i) { header[12] = (byte) (i >> 8 & 0xFF); header[13] = (byte) (i & 0xFF); } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); voi...
### Question: BASE1Header extends BaseHeader { public void setFormat(int format) { header[2] = (byte) format; } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); void setHFormat(int hformat); int getFo...
### Question: BASE1Header extends BaseHeader { public void setHFormat(int hformat) { header[1] = (byte) hformat; } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); void setHFormat(int hformat); int ge...
### Question: UI extends QBeanSupport implements UIObjectFactory { public void startService () throws Exception { Element config = getPersist (); String provider = config.getAttributeValue ("provider", "org.jpos.ui.UI"); ui = (org.jpos.ui.UI) getFactory().newInstance (provider); ui.setConfig (config); ui.setLog (getLog...
### Question: BASE1Header extends BaseHeader { public void setLen(int len) { len += header.length; header[3] = (byte) (len >> 8 & 0xff); header[4] = (byte) (len & 0xff); } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] hea...
### Question: BASE1Header extends BaseHeader { public void setRtCtl(int i) { header[11] = (byte) i; } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int getHLen(); void setHFormat(int hformat); int getFormat(); vo...
### Question: BASE1Header extends BaseHeader { public void setSource(String src) { byte[] d = ISOUtil.str2bcd(src, true); System.arraycopy(d, 0, header, 8, 3); } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1Header(byte[] header); int ...
### Question: BASE1Header extends BaseHeader { public void setStatus(int i) { header[14] = (byte) (i >> 16 & 0xFF); header[15] = (byte) (i >> 8 & 0xFF); header[16] = (byte) (i & 0xFF); } BASE1Header(); BASE1Header(String source, String destination); BASE1Header(String source, String destination, int format); BASE1He...
### Question: BaseHeader implements ISOHeader, Loggeable { public Object clone() { try { BaseHeader h = (BaseHeader) super.clone(); if (this.header != null) h.header = this.header.clone(); return h; } catch (CloneNotSupportedException e) { throw new InternalError(); } } BaseHeader(); BaseHeader(byte[] header); Object ...
### Question: BaseHeader implements ISOHeader, Loggeable { public void dump (PrintStream p, String indent) { if (header != null) { p.println ( indent + "<header>" + ISOUtil.hexString (header) + "</header>" ); } } BaseHeader(); BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int get...
### Question: BaseHeader implements ISOHeader, Loggeable { public String getDestination() { return null; } BaseHeader(); BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int getLength(); void setDestination(String dst); void setSource(String src); String getDestination(); String get...
### Question: BaseHeader implements ISOHeader, Loggeable { public int getLength () { return header != null ? header.length : 0; } BaseHeader(); BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int getLength(); void setDestination(String dst); void setSource(String src); String getDe...
### Question: BaseHeader implements ISOHeader, Loggeable { public String getSource() { return null; } BaseHeader(); BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int getLength(); void setDestination(String dst); void setSource(String src); String getDestination(); String getSourc...
### Question: BaseHeader implements ISOHeader, Loggeable { public byte[] pack() { return header != null ? header.clone() : null; } BaseHeader(); BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int getLength(); void setDestination(String dst); void setSource(String src); String getD...
### Question: BaseHeader implements ISOHeader, Loggeable { public void setDestination(String dst) {} BaseHeader(); BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int getLength(); void setDestination(String dst); void setSource(String src); String getDestination(); String getSource...
### Question: UI extends QBeanSupport implements UIObjectFactory { public void stopService () { NameRegistrar.unregister (getName()); if (ui != null) ui.dispose (); } UI(); void startService(); void stopService(); Object newInstance(String clazz); }### Answer: @Test public void testStopService() throws Throwable { UI ...
### Question: CharTagMapBuilder { public CharTagMap build() throws IllegalArgumentException { CharTagMap tm = CharTagMap.getInstance(); if (tagSize != null) tm.setTagSize(tagSize); if (lengthSize != null) tm.setLengthSize(lengthSize); tm.withTagLengthSwap(swapTagWithLength); return tm; } CharTagMapBuilder(); CharTagMap...
### Question: BaseHeader implements ISOHeader, Loggeable { public void setSource(String src) {} BaseHeader(); BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int getLength(); void setDestination(String dst); void setSource(String src); String getDestination(); String getSource(); v...
### Question: BaseHeader implements ISOHeader, Loggeable { public void swapDirection() {} BaseHeader(); BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int getLength(); void setDestination(String dst); void setSource(String src); String getDestination(); String getSource(); void sw...
### Question: BaseHeader implements ISOHeader, Loggeable { public int unpack (byte[] header) { if (header != null) { this.header = header.clone(); return header.length; } else { this.header = null; } return 0; } BaseHeader(); BaseHeader(byte[] header); Object clone(); byte[] pack(); int unpack(byte[] header); int getL...
### Question: EbcdicHexInterpreter implements BinaryInterpreter { public void interpret(byte[] data, byte[] b, int offset) { for (int i = 0; i < data.length; i++) { b[offset + i * 2] = HEX_EBCDIC[(data[i] & 0xF0) >> 4]; b[offset + i * 2 + 1] = HEX_EBCDIC[data[i] & 0x0F]; } } void interpret(byte[] data, byte[] b, int o...
### Question: EbcdicHexInterpreter implements BinaryInterpreter { public byte[] uninterpret(byte[] rawData, int offset, int length) { byte[] ret = new byte[length]; for (int i = 0; i < length; i++) { byte hi = rawData[offset + i * 2]; byte lo = rawData[offset + i * 2 + 1]; int h = hi < (byte) 0xF0 ? 10 + hi - 0xC0 : hi...
### Question: MUXPool extends QBeanSupport implements MUX, MUXPoolMBean { public void initService () throws ConfigurationException { Element e = getPersist (); muxName = toStringArray(e.getChildTextTrim ("muxes")); strategy = getStrategy(e.getChildTextTrim("strategy")); overrideMTIs = toStringArray(e.getChildTextTrim("...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void addIncomingFilter (ISOFilter filter) { addFilter(filter, ISOMsg.INCOMING); } BaseChannel(); Ba...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void addOutgoingFilter (ISOFilter filter) { addFilter(filter, ISOMsg.OUTGOING); } BaseChannel(); Ba...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected ISOMsg applyIncomingFilters (ISOMsg m, LogEvent evt) throws VetoException { return applyIncomingF...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected ISOMsg applyOutgoingFilters (ISOMsg m, LogEvent evt) throws VetoException { for (ISOFilter f :out...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected void applyTimeout () throws SocketException { if (socket != null) { socket.setKeepAlive(keepAlive...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected ISOMsg createISOMsg () { return packager.createISOMsg (); } BaseChannel(); BaseChannel(String ho...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected ISOMsg createMsg () { return createISOMsg(); } BaseChannel(); BaseChannel(String host, int port,...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void disconnect () throws IOException { LogEvent evt = new LogEvent (this, "disconnect"); if (server...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public static ISOChannel getChannel (String name) throws NameRegistrar.NotFoundException { return (ISOChann...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public int[] getCounters() { return cnt; } BaseChannel(); BaseChannel(String host, int port, ISOPackager p...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected ISOHeader getDynamicHeader (byte[] image) { return image != null ? new BaseHeader (image) : null;...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected ISOPackager getDynamicPackager (ISOMsg m) { return packager; } BaseChannel(); BaseChannel(String...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public byte[] getHeader () { return header; } BaseChannel(); BaseChannel(String host, int port, ISOPackage...
### Question: MUXPool extends QBeanSupport implements MUX, MUXPoolMBean { public boolean isConnected() { for (MUX m : mux) if (isUsable(m)) return true; return false; } void initService(); void stopService(); ISOMsg request(ISOMsg m, long timeout); void send(ISOMsg m); boolean isConnected(); void request(ISOMsg m, lon...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected int getHeaderLength() { return header != null ? header.length : 0; } BaseChannel(); BaseChannel(...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public Collection<ISOFilter> getIncomingFilters() { return incomingFilters; } BaseChannel(); BaseChannel(S...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected void getMessage (byte[] b, int offset, int len) throws IOException, ISOException { serverIn.readF...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public String getOriginalRealm() { return originalRealm == null ? this.getClass().getName() : originalRealm...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public Collection<ISOFilter> getOutgoingFilters() { return outgoingFilters; } BaseChannel(); BaseChannel(S...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public ISOPackager getPackager() { return packager; } BaseChannel(); BaseChannel(String host, int port, IS...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public ServerSocket getServerSocket() { return serverSocket; } BaseChannel(); BaseChannel(String host, int...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public Socket getSocket() { return socket; } BaseChannel(); BaseChannel(String host, int port, ISOPackager...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public ISOClientSocketFactory getSocketFactory() { return socketFactory; } BaseChannel(); BaseChannel(Stri...
### Question: MUXPool extends QBeanSupport implements MUX, MUXPoolMBean { public ISOMsg request (ISOMsg m, long timeout) throws ISOException { long maxWait = System.currentTimeMillis() + timeout; MUX mux = getMUX(m,maxWait); if (mux != null) { timeout = maxWait - System.currentTimeMillis(); if (timeout >= 0) return mux...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public boolean isConnected() { return socket != null && usable; } BaseChannel(); BaseChannel(String host, ...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public boolean isOverrideHeader () { return overrideHeader; } BaseChannel(); BaseChannel(String host, int ...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected boolean isRejected(byte[] b) { return false; } BaseChannel(); BaseChannel(String host, int port,...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void removeIncomingFilter (ISOFilter filter) { removeFilter(filter, ISOMsg.INCOMING); } BaseChannel(...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void removeOutgoingFilter (ISOFilter filter) { removeFilter (filter, ISOMsg.OUTGOING); } BaseChannel...
### Question: MUXPool extends QBeanSupport implements MUX, MUXPoolMBean { public void stopService () { NameRegistrar.unregister ("mux."+getName ()); } void initService(); void stopService(); ISOMsg request(ISOMsg m, long timeout); void send(ISOMsg m); boolean isConnected(); void request(ISOMsg m, long timeout, final I...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void resetCounters() { for (int i=0; i<SIZEOF_CNT; i++) cnt[i] = 0; } BaseChannel(); BaseChannel(St...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected void sendMessageHeader(ISOMsg m, int len) throws IOException { if (!isOverrideHeader() && m.getHe...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected void sendMessageLength(int len) throws IOException { } BaseChannel(); BaseChannel(String host, i...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { @SuppressWarnings("deprecation") protected void sendMessageTrailer(ISOMsg m, byte[] b) throws IOException {...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setHeader (byte[] header) { this.header = header; } BaseChannel(); BaseChannel(String host, in...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setHost(String host, int port) { this.host = host; this.port = port; this.hosts = new String[] ...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setIncomingFilters (Collection filters) { incomingFilters = new ArrayList (filters); } BaseChan...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setLocalAddress (String iface, int port) { this.localIface = iface; this.localPort = port; } Ba...
### Question: ChannelAdaptor extends QBeanSupport implements ChannelAdaptorMBean, Channel, Loggeable, ExceptionHandlerConfigAware { public void send (ISOMsg m) { sp.out (in, m); } ChannelAdaptor(); void initService(); void startService(); void stopService(); void destroyService(); synchronized void setReconnectDelay(lo...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setLogger (Logger logger, String realm) { this.logger = logger; this.realm = realm; if (origina...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setMaxPacketLength(int maxPacketLength) { this.maxPacketLength = maxPacketLength; } BaseChannel...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setName (String name) { this.name = name; NameRegistrar.register("channel." + name, this); } Ba...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setOutgoingFilters (Collection filters) { outgoingFilters = new ArrayList (filters); } BaseChan...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setOverrideHeader (boolean overrideHeader) { this.overrideHeader = overrideHeader; } BaseChanne...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setPackager(ISOPackager p) { this.packager = p; } BaseChannel(); BaseChannel(String host, int ...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setPort (int port) { this.port = port; this.ports = new int[] { port }; } BaseChannel(); BaseC...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setServerSocket (ServerSocket sock) { setHost (null, 0); this.serverSocket = sock; name = ""; }...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setSocketFactory(ISOClientSocketFactory socketFactory) { this.socketFactory = socketFactory; } ...
### Question: ChannelAdaptor extends QBeanSupport implements ChannelAdaptorMBean, Channel, Loggeable, ExceptionHandlerConfigAware { public ISOMsg receive () { return (ISOMsg) sp.in (out); } ChannelAdaptor(); void initService(); void startService(); void stopService(); void destroyService(); synchronized void setReconne...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { public void setTimeout (int timeout) throws SocketException { this.timeout = timeout; applyTimeout(); } Bas...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected boolean shouldIgnore (byte[] b) { return false; } BaseChannel(); BaseChannel(String host, int po...
### Question: BaseChannel extends Observable implements FilteredChannel, ClientChannel, ServerChannel, FactoryChannel, LogSource, Configurable, BaseChannelMBean, Cloneable, ExceptionHandlerAware { protected byte[] streamReceive() throws IOException { return new byte[0]; } BaseChannel(); BaseChannel(Str...
### Question: ISOFieldPackager { public ISOComponent createComponent(int fieldNumber) { return new ISOField (fieldNumber); } ISOFieldPackager(); ISOFieldPackager(int len, String description); String getDescription(); void setDescription(String description); int getLength(); void setLength(int len); void setPad(boolean...
### Question: ISOFieldPackager { public abstract byte[] pack (ISOComponent c) throws ISOException; ISOFieldPackager(); ISOFieldPackager(int len, String description); String getDescription(); void setDescription(String description); int getLength(); void setLength(int len); void setPad(boolean pad); void setTrim(boolea...
### Question: ISOFieldPackager { protected byte[] readBytes (InputStream in, int l) throws IOException { byte[] b = new byte [l]; int n = 0; while (n < l) { int count = in.read(b, n, l - n); if (count < 0) throw new EOFException(); n += count; } return b; } ISOFieldPackager(); ISOFieldPackager(int len, String descript...
### Question: ChannelAdaptor extends QBeanSupport implements ChannelAdaptorMBean, Channel, Loggeable, ExceptionHandlerConfigAware { protected void disconnect () { synchronized (disconnectLock) { try { SpaceUtil.wipe(sp, ready); channel.disconnect(); } catch (Exception e) { getLog().warn("disconnect", e); } } } ChannelA...
### Question: ISOFieldPackager { public void setDescription(String description) { this.description = description; } ISOFieldPackager(); ISOFieldPackager(int len, String description); String getDescription(); void setDescription(String description); int getLength(); void setLength(int len); void setPad(boolean pad); vo...
### Question: ISOFieldPackager { public void setLength(int len) { this.len = len; } ISOFieldPackager(); ISOFieldPackager(int len, String description); String getDescription(); void setDescription(String description); int getLength(); void setLength(int len); void setPad(boolean pad); void setTrim(boolean trim); abstra...
### Question: ISOFieldPackager { public void setPad(boolean pad) { this.pad = pad; } ISOFieldPackager(); ISOFieldPackager(int len, String description); String getDescription(); void setDescription(String description); int getLength(); void setLength(int len); void setPad(boolean pad); void setTrim(boolean trim); abstr...
### Question: ISOFieldPackager { public abstract int unpack (ISOComponent c, byte[] b, int offset) throws ISOException; ISOFieldPackager(); ISOFieldPackager(int len, String description); String getDescription(); void setDescription(String description); int getLength(); void setLength(int len); void setPad(boolean pad)...
### Question: IFAE_LLCHAR extends ISOStringFieldPackager { public void setLength(int len) { checkLength(len, 99); super.setLength(len); } IFAE_LLCHAR(); IFAE_LLCHAR(int len, String description); void setLength(int len); }### Answer: @Test public void testPackWithPackagerWithoutDescription() throws Exception { ISOFiel...