/** * Sets the modifiable series of parameters. * * @param parameters * The modifiable series of parameters. */ public synchronized void setParameters(Series<Parameter> parameters) { this.parameters.clear(); this.parameters.addAll(parameters); }
protected void setupCookies(Request request) { if (cookies != null) { request.getCookies().clear(); for (Cookie cookie : cookies) { request.getCookies().add(cookie); } } }
/** * Sets the modifiable series of parameters. This method clears the current * series and adds all entries in the parameter series. * * @param parameters * A series of parameters. */ public void setParameters(Series<Parameter> parameters) { synchronized (getParameters()) { if (parameters != getParameters()) { getParameters().clear(); if (parameters != null) { getParameters().addAll(parameters); } } } }
/** * Sets the modifiable series of parameters. This method clears the current * series and adds all entries in the parameter series. * * @param parameters * A series of parameters. */ public void setParameters(Series<Parameter> parameters) { synchronized (getParameters()) { if (parameters != getParameters()) { getParameters().clear(); if (parameters != null) { getParameters().addAll(parameters); } } } }
/** * Constructor. * * @param server * The parent server. * @param byteBuffer * The NIO byte buffer. * @param key * The NIO selection key. * @param confidential * Indicates if the call is confidential. */ public GrizzlyServerCall(Server server, ByteBuffer byteBuffer, SelectionKey key, boolean confidential) { super(server); setConfidential(confidential); this.byteBuffer = byteBuffer; this.requestStream = new InputReader(); this.requestStream.setSelectionKey(key); this.requestStream.setByteBuffer(byteBuffer); this.socketChannel = (SocketChannel) key.channel(); getRequestHeaders().clear(); try { // Read the request header readRequestHead(this.requestStream); } catch (IOException ioe) { getLogger().log(Level.WARNING, "Unable to parse the HTTP request", ioe); } }
/** * Sets the modifiable series of parameters. This method clears the current * series and adds all entries in the parameter series. * * @param parameters * A series of parameters. */ public void setParameters(Series<Parameter> parameters) { synchronized (getParameters()) { if (parameters != getParameters()) { getParameters().clear(); if (parameters != null) { getParameters().addAll(parameters); } } } }
/** * Sets the modifiable series of cookie settings provided by the server. * Note that when used with HTTP connectors, this property maps to the * "Set-Cookie" and "Set-Cookie2" headers. This method clears the current * series and adds all entries in the parameter series. * * @param cookieSettings * A series of cookie settings provided by the server. */ public void setCookieSettings(Series<CookieSetting> cookieSettings) { synchronized (getCookieSettings()) { if (cookieSettings != getCookieSettings()) { getCookieSettings().clear(); if (cookieSettings != null) { getCookieSettings().addAll(cookieSettings); } } } }
/** * Sets the modifiable series of cookies provided by the client. Note that * when used with HTTP connectors, this property maps to the "Cookie" * header. This method clears the current series and adds all entries in the * parameter series. * * @param cookies * A series of cookies provided by the client. */ public void setCookies(Series<Cookie> cookies) { synchronized (getCookies()) { if (cookies != getCookies()) { if (getCookies() != null) { getCookies().clear(); } if (cookies != null) { getCookies().addAll(cookies); } } } }
/** * Sets the modifiable series of cookies provided by the client. Note that * when used with HTTP connectors, this property maps to the "Cookie" * header. This method clears the current series and adds all entries in the * parameter series. * * @param cookies * A series of cookies provided by the client. */ public void setCookies(Series<Cookie> cookies) { synchronized (getCookies()) { if (cookies != getCookies()) { if (getCookies() != null) { getCookies().clear(); } if (cookies != null) { getCookies().addAll(cookies); } } } }