public void onCompletion(@NotNull Packet response) { try { encodePacket(connection, response, codec); } catch(IOException ioe) { ioe.printStackTrace(); } codecPool.recycle(codec); } });
/** * Reads and decodes infoset from the connection and invokes the endpoints. The * response is encoded and written to the connection. The response could be * written using a different thread. * * @param connection that carries the web service request * @throws IOException if an i/o error happens while encoding/decoding */ protected void handle(final T connection) throws IOException { final Codec codec = codecPool.take(); Packet request = decodePacket(connection, codec); if (!request.getMessage().isFault()) { endpoint.schedule(request, new WSEndpoint.CompletionCallback() { public void onCompletion(@NotNull Packet response) { try { encodePacket(connection, response, codec); } catch(IOException ioe) { ioe.printStackTrace(); } codecPool.recycle(codec); } }); } }
/** * Reads and decodes infoset from the connection and invokes the endpoints. The * response is encoded and written to the connection. The response could be * written using a different thread. * * @param connection that carries the web service request * @throws IOException if an i/o error happens while encoding/decoding */ protected void handle(final T connection) throws IOException { final Codec codec = codecPool.take(); Packet request = decodePacket(connection, codec); if (!request.getMessage().isFault()) { endpoint.schedule(request, new WSEndpoint.CompletionCallback() { public void onCompletion(@NotNull Packet response) { try { encodePacket(connection, response, codec); } catch(IOException ioe) { ioe.printStackTrace(); } codecPool.recycle(codec); } }); } }
/** * Reads and decodes infoset from the connection and invokes the endpoints. The * response is encoded and written to the connection. The response could be * written using a different thread. * * @param connection that carries the web service request * @throws IOException if an i/o error happens while encoding/decoding */ protected void handle(final T connection) throws IOException { final Codec codec = codecPool.take(); Packet request = decodePacket(connection, codec); if (!request.getMessage().isFault()) { endpoint.schedule(request, new WSEndpoint.CompletionCallback() { public void onCompletion(@NotNull Packet response) { try { encodePacket(connection, response, codec); } catch(IOException ioe) { ioe.printStackTrace(); } codecPool.recycle(codec); } }); } }
/** * {@link WSEndpoint#setExecutor} should be called before creating the * transport * * @param endpoint webservices requests are directed towards this endpoint */ public AbstractServerAsyncTransport(WSEndpoint endpoint) { this.endpoint = endpoint; codecPool = new CodecPool(endpoint); }
/** * {@link WSEndpoint#setExecutor} should be called before creating the * transport * * @param endpoint webservices requests are directed towards this endpoint */ public AbstractServerAsyncTransport(WSEndpoint endpoint) { this.endpoint = endpoint; codecPool = new CodecPool(endpoint); }
public void onCompletion(@NotNull Packet response) { try { encodePacket(connection, response, codec); } catch(IOException ioe) { ioe.printStackTrace(); } codecPool.recycle(codec); } });
/** * {@link WSEndpoint#setExecutor} should be called before creating the * transport * * @param endpoint webservices requests are directed towards this endpoint */ public AbstractServerAsyncTransport(WSEndpoint endpoint) { this.endpoint = endpoint; codecPool = new CodecPool(endpoint); }
public void onCompletion(@NotNull Packet response) { try { encodePacket(connection, response, codec); } catch(IOException ioe) { ioe.printStackTrace(); } codecPool.recycle(codec); } });