public class ContextPathEncoderImpl extends java.lang.Object implements ContextPathEncoder
| Constructor and Description |
|---|
ContextPathEncoderImpl(ContextValueEncoder valueEncoder,
URLEncoder urlEncoder,
TypeCoercer typeCoercer) |
| Modifier and Type | Method and Description |
|---|---|
EventContext |
decodePath(java.lang.String path)
Inverse of
ContextPathEncoder.encodeIntoPath(Object[]); the path is split into strings, and the string are decoded and
constructed into an EventContext. |
java.lang.String |
encodeIntoPath(EventContext context)
Encodes the context into a string.
|
java.lang.String |
encodeIntoPath(java.lang.Object[] context)
Encodes the context values into a path string.
|
java.lang.String |
encodeValue(java.lang.Object value)
Encodes a single value via the
ContextValueEncoder service, returning the resulting string. |
public ContextPathEncoderImpl(ContextValueEncoder valueEncoder, URLEncoder urlEncoder, TypeCoercer typeCoercer)
public java.lang.String encodeValue(java.lang.Object value)
ContextPathEncoderContextValueEncoder service, returning the resulting string. Even null
is encoded, as per URLEncoder.encode(String).encodeValue in interface ContextPathEncoderpublic java.lang.String encodeIntoPath(java.lang.Object[] context)
ContextPathEncoderContextValueEncoder service. Those values are then encoded,
via URLEncoder.encode(String) into URL-safe strings. The URL-safe strings are then concatenated
together, separated with "/" characters.encodeIntoPath in interface ContextPathEncodercontext - an array of objects to encode as the context (may be null)public java.lang.String encodeIntoPath(EventContext context)
ContextPathEncoderencodeIntoPath in interface ContextPathEncodercontext - to encodepublic EventContext decodePath(java.lang.String path)
ContextPathEncoderContextPathEncoder.encodeIntoPath(Object[]); the path is split into strings, and the string are decoded and
constructed into an EventContext.decodePath in interface ContextPathEncoderpath - to decode, possibly empty or null${project.version} - Copyright © 2003-2015 The Apache Software Foundation.