@Override public NextAction handleRead(final FilterChainContext ctx) throws IOException { // blocking mode means this read is initiated from HttpHandler if (!ctx.getTransportContext().isBlocking()) { // create a plug for this FilterChainContext final Plug plug = Plug.create(ctx, this); ctx.getInternalContext().addLifeCycleListener(plug); plugAttr.set(ctx, plug); } return ctx.getInvokeAction(); }
/** * Releases the plug, which means we have to flush all the data and * remove the PlugFilter attr from the context. * * @param context */ private void unplug(final Context context) { if (isPlugged) { flush(); ctx.completeAndRecycle(); isPlugged = false; context.removeLifeCycleListener(this); plugFilter.plugAttr.remove(context); recycle(); } }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Releases the plug, which means we have to flush all the data and * remove the PlugFilter attr from the context. * * @param context */ private void unplug(final Context context) { if (isPlugged) { flush(); ctx.completeAndRecycle(); isPlugged = false; context.removeLifeCycleListener(this); plugFilter.plugAttr.remove(context); recycle(); } }
/** * Releases the plug, which means we have to flush all the data and * remove the PlugFilter attr from the context. * * @param context */ private void unplug(final Context context) { if (isPlugged) { flush(); ctx.completeAndRecycle(); isPlugged = false; context.removeLifeCycleListener(this); plugFilter.plugAttr.remove(context); recycle(); } }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Releases the plug, which means we have to flush all the data and * remove the PlugFilter attr from the context. * * @param context */ private void unplug(final Context context) { if (isPlugged) { flush(); ctx.completeAndRecycle(); isPlugged = false; context.removeLifeCycleListener(this); plugFilter.plugAttr.remove(context); recycle(); } }
/** * Releases the plug, which means we have to flush all the data and * remove the PlugFilter attr from the context. * * @param context */ private void unplug(final Context context) { if (isPlugged) { flush(); ctx.completeAndRecycle(); isPlugged = false; context.removeLifeCycleListener(this); plugFilter.plugAttr.remove(context); recycle(); } }
/** * Appends buffer to the queue. * * @param msg * @param completionHandler * @return */ private boolean append(final Buffer msg, final CompletionHandler completionHandler) { if (isPlugged) { obtainCompositeBuffer().append(msg); if (completionHandler != null) { obtainAggrCompletionHandler().add(completionHandler); } return true; } return false; }
/** * Releases the plug, which means we have to flush all the data and * remove the PlugFilter attr from the context. * * @param context */ private void unplug(final Context context) { if (isPlugged) { flush(); ctx.completeAndRecycle(); isPlugged = false; context.removeLifeCycleListener(this); plugFilter.plugAttr.remove(context); recycle(); } }
/** * Releases the plug, which means we have to flush all the data and * remove the PlugFilter attr from the context. * * @param context */ private void unplug(final Context context) { if (isPlugged) { flush(); ctx.completeAndRecycle(); isPlugged = false; context.removeLifeCycleListener(this); plugFilter.plugAttr.remove(context); recycle(); } }