/** * Sets the timeout to wait for a response from the server * * @param timeout time in milliseconds */ public void setTimeoutMillis(int timeout) { setTimeout(timeout, TimeUnit.MILLISECONDS); }
public ActiveConnection(Parser parser, LowerLayerProtocol llp, Socket bidirectional, ExecutorService executorService) throws LLPException, IOException { init(parser, executorService, bidirectional); ackWriter = llp.getWriter(bidirectional.getOutputStream()); sendWriter = ackWriter; this.executorService = executorService; sockets.add(bidirectional); receivers.add(new Receiver(this, llp.getReader(bidirectional .getInputStream()))); this.initiator = new ActiveInitiator(this); }
public ActiveConnection(Parser parser, LowerLayerProtocol llp, Socket bidirectional, ExecutorService executorService) throws LLPException, IOException { init(parser, executorService, bidirectional); ackWriter = llp.getWriter(bidirectional.getOutputStream()); sendWriter = ackWriter; this.executorService = executorService; sockets.add(bidirectional); receivers.add(new Receiver(this, llp.getReader(bidirectional .getInputStream()))); this.initiator = new ActiveInitiator(this); }
/** * Creates a new instance of Connection, with inbound communication on one * port and outbound on another. */ public ActiveConnection(Parser parser, LowerLayerProtocol llp, Socket inbound, Socket outbound, ExecutorService executorService) throws LLPException, IOException { init(parser, executorService, inbound); ackWriter = llp.getWriter(inbound.getOutputStream()); sendWriter = llp.getWriter(outbound.getOutputStream()); sockets.add(outbound); // always add outbound first ... see getRemoteAddress() sockets.add(inbound); receivers.add(new Receiver(this, llp.getReader(inbound.getInputStream()))); receivers.add(new Receiver(this, llp.getReader(outbound .getInputStream()))); this.initiator = new ActiveInitiator(this); }
/** * Sets the timeout to wait for a response from the server * * @param timeout time in milliseconds */ public void setTimeoutMillis(int timeout) { setTimeout(timeout, TimeUnit.MILLISECONDS); }
/** * Creates a new instance of Connection, with inbound communication on one * port and outbound on another. */ public ActiveConnection(Parser parser, LowerLayerProtocol llp, Socket inbound, Socket outbound, ExecutorService executorService) throws LLPException, IOException { init(parser, executorService, inbound); ackWriter = llp.getWriter(inbound.getOutputStream()); sendWriter = llp.getWriter(outbound.getOutputStream()); sockets.add(outbound); // always add outbound first ... see getRemoteAddress() sockets.add(inbound); receivers.add(new Receiver(this, llp.getReader(inbound.getInputStream()))); receivers.add(new Receiver(this, llp.getReader(outbound .getInputStream()))); this.initiator = new ActiveInitiator(this); }