List of usage examples for io.netty.handler.codec.http Cookie getVersion
@Deprecated
int getVersion();
From source file:com.mastfrog.acteur.wicket.adapters.CookieConverter.java
License:Open Source License
@Override public Cookie unconvert(javax.servlet.http.Cookie t) { if (t instanceof CookieAdapter) { return ((CookieAdapter) t).cookie; } else {//from w w w .j a v a 2 s . c o m DefaultCookie dc = new DefaultCookie(t.getName(), t.getValue()); dc.setComment(t.getComment()); dc.setMaxAge(t.getMaxAge()); dc.setDomain(t.getDomain()); dc.setVersion(t.getVersion()); return dc; } }
From source file:com.titilink.camel.rest.common.AdapterRestletUtil.java
License:LGPL
/** * ?Cookie//from w w w . j av a2s. c o m * * @param cookie * @return */ public static org.restlet.data.Cookie parseToRestletCookie(Cookie cookie) { if (null == cookie) { LOGGER.error("cookie=null"); return null; } org.restlet.data.Cookie restletCookie = new org.restlet.data.Cookie(); restletCookie.setDomain(cookie.getDomain()); restletCookie.setVersion(cookie.getVersion()); restletCookie.setName(cookie.getName()); restletCookie.setValue(cookie.getValue()); restletCookie.setPath(cookie.getPath()); return restletCookie; }
From source file:io.nebo.container.NettyHttpServletRequest.java
License:Apache License
@Override public Cookie[] getCookies() { String cookieString = this.request.headers().get(COOKIE); if (cookieString != null) { Set<io.netty.handler.codec.http.Cookie> cookies = CookieDecoder.decode(cookieString); if (!cookies.isEmpty()) { Cookie[] cookiesArray = new Cookie[cookies.size()]; int index = 0; for (io.netty.handler.codec.http.Cookie c : cookies) { Cookie cookie = new Cookie(c.getName(), c.getValue()); cookie.setComment(c.getComment()); if (c.getDomain() != null) cookie.setDomain(c.getDomain()); cookie.setMaxAge((int) c.getMaxAge()); cookie.setPath(c.getPath()); cookie.setSecure(c.isSecure()); cookie.setVersion(c.getVersion()); cookiesArray[index] = cookie; index++;/* w w w.j a va 2 s .co m*/ } return cookiesArray; } } return new Cookie[0]; }