@Override public void setProperty(String name, Object value) { request.setAttribute(name, value); }
@Override public void setProperty(String name, Object value) { request.setAttribute(name, value); }
private void setDispatcherPath(final Request request, final String path) { request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR, path); }
private void setDispatcherPath(final Request request, final String path) { request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR, path); }
private void setDispatcherPath(final Request request, final String path) { request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR, path); }
private void setDispatcherPath(final Request request, final String path) { request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR, path); }
private void setDispatcherPath(final Request request, final String path) { request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR, path); }
private void setDispatcherPath(final Request request, final String path) { request.setAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR, path); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
/** * Instrument the specified {@link Request} with an attribute marking its * <em>received</em> time (in {@linkplain System#nanoTime() nanoseconds}). */ @Override @SuppressWarnings("rawtypes") public void onRequestReceiveEvent(HttpServerFilter filter, Connection connection, Request request) { request.setAttribute(ATTRIBUTE_TIME_STAMP, System.nanoTime()); /* * It seems that in some edge cases Grizzly is not caching the * connection addresses in the request / response structure. Internally * the TCPNIOConnectionClass uses a Holder to store those (which * provides lazy initialization). We force the holders to get (and * cache) the values by alling the "get(Local|Peer)Address()" methods. */ connection.getLocalAddress(); connection.getPeerAddress(); }
public static Object populateCertificateAttribute(final Request request) { Object certificates = null; if (request.getRequest().isSecure()) { if (!request.getRequest().isUpgrade()) { // It's normal HTTP request, not upgraded one try { request.getInputBuffer().fillFully( request.getHttpFilter().getConfiguration().getMaxBufferedPostSize()); } catch (IOException e) { throw new IllegalStateException("Can't complete SSL re-negotation", e); } } GrizzlyFuture<Object[]> certFuture = new CertificateEvent(true).trigger(request.getContext()); try { // TODO: make the timeout configurable certificates = certFuture.get(30, TimeUnit.SECONDS); } catch (Exception e) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Unable to obtain certificates from peer.", e); } } request.setAttribute(SSLSupport.CERTIFICATE_KEY, certificates); } return certificates; }