io.undertow.attribute.ReadOnlyAttributeException Java Examples
The following examples show how to use
io.undertow.attribute.ReadOnlyAttributeException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServletSessionAttribute.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { ServletRequestContext context = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY); if (context != null) { ServletRequest req = context.getServletRequest(); if (req instanceof HttpServletRequest) { HttpSession session = ((HttpServletRequest) req).getSession(false); if (session != null) { session.setAttribute(attributeName, newValue); } } } }
Example #2
Source File: ServletSessionAttribute.java From quarkus-http with Apache License 2.0 | 5 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { ServletRequestContext context = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY); if (context != null) { ServletRequest req = context.getServletRequest(); if (req instanceof HttpServletRequest) { HttpSession session = ((HttpServletRequest) req).getSession(false); if (session != null) { session.setAttribute(attributeName, newValue); } } } }
Example #3
Source File: ServletContextAttribute.java From quarkus-http with Apache License 2.0 | 5 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { ServletRequestContext context = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY); if (context != null) { context.getCurrentServletContext().setAttribute(attributeName, newValue); } }
Example #4
Source File: ServletContextAttribute.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { ServletRequestContext context = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY); if (context != null) { context.getCurrentServletContext().setAttribute(attributeName, newValue); } }
Example #5
Source File: ServletRequestAttribute.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { ServletRequestContext context = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY); if (context != null) { context.getServletRequest().setAttribute(attributeName, newValue); } else { Map<String, String> attrs = exchange.getAttachment(HttpServerExchange.REQUEST_ATTRIBUTES); if(attrs == null) { exchange.putAttachment(HttpServerExchange.REQUEST_ATTRIBUTES, attrs = new HashMap<>()); } attrs.put(attributeName, newValue); } }
Example #6
Source File: ServletRequestAttribute.java From quarkus-http with Apache License 2.0 | 5 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { ServletRequestContext context = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY); if (context != null) { context.getServletRequest().setAttribute(attributeName, newValue); } else { Map<String, String> attrs = exchange.getAttachment(HttpServerExchange.REQUEST_ATTRIBUTES); if(attrs == null) { exchange.putAttachment(HttpServerExchange.REQUEST_ATTRIBUTES, attrs = new HashMap<>()); } attrs.put(attributeName, newValue); } }
Example #7
Source File: ServletRequestedSessionIdAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Session ID", newValue); }
Example #8
Source File: ServletSessionIdAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Session ID", newValue); }
Example #9
Source File: ServletRelativePathAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { RelativePathAttribute.INSTANCE.writeAttribute(exchange, newValue); }
Example #10
Source File: ServletRequestURLAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { RequestURLAttribute.INSTANCE.writeAttribute(exchange, newValue); }
Example #11
Source File: ServletRequestLocaleAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Locale", newValue); }
Example #12
Source File: ServletRequestParameterAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException(); }
Example #13
Source File: ServletRequestCharacterEncodingAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Request Character Encoding", newValue); }
Example #14
Source File: ServletRequestedSessionIdValidAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Requested session ID from cookie", newValue); }
Example #15
Source File: ServletRequestedSessionIdFromCookieAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Requested session ID from cookie", newValue); }
Example #16
Source File: ServletNameAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException(NAME, newValue); }
Example #17
Source File: JsonLogFormatter.java From digdag with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(HttpServerExchange exchange, String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException(); }
Example #18
Source File: ServletRequestLineAttribute.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Request line", newValue); }
Example #19
Source File: ServletRequestCharacterEncodingAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Request Character Encoding", newValue); }
Example #20
Source File: ServletNameAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException(NAME, newValue); }
Example #21
Source File: ServletRequestedSessionIdFromCookieAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Requested session ID from cookie", newValue); }
Example #22
Source File: ServletRequestedSessionIdValidAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Requested session ID from cookie", newValue); }
Example #23
Source File: ServletRequestedSessionIdAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Session ID", newValue); }
Example #24
Source File: ServletRequestParameterAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException(); }
Example #25
Source File: ServletRequestLocaleAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Locale", newValue); }
Example #26
Source File: ServletRequestURLAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { RequestURLAttribute.INSTANCE.writeAttribute(exchange, newValue); }
Example #27
Source File: ServletRelativePathAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { RelativePathAttribute.INSTANCE.writeAttribute(exchange, newValue); }
Example #28
Source File: ServletSessionIdAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Session ID", newValue); }
Example #29
Source File: ServletRequestLineAttribute.java From quarkus-http with Apache License 2.0 | 4 votes |
@Override public void writeAttribute(final HttpServerExchange exchange, final String newValue) throws ReadOnlyAttributeException { throw new ReadOnlyAttributeException("Request line", newValue); }