public class RpcV2CborUnmarshallerContextImpl extends RpcV2CborUnmarshallerContext
RpcV2CborUnmarshallerContext.UnmarshallerType| Constructor and Description |
|---|
RpcV2CborUnmarshallerContextImpl(com.fasterxml.jackson.dataformat.cbor.CBORParser cborParser,
Map<Class<?>,Unmarshaller<?,RpcV2CborUnmarshallerContext>> mapper,
HttpResponse httpResponse) |
RpcV2CborUnmarshallerContextImpl(com.fasterxml.jackson.dataformat.cbor.CBORParser cborParser,
Map<Class<?>,Unmarshaller<?,RpcV2CborUnmarshallerContext>> mapper,
Map<RpcV2CborUnmarshallerContext.UnmarshallerType,Unmarshaller<?,RpcV2CborUnmarshallerContext>> customUnmarshallerMap,
HttpResponse httpResponse) |
| Modifier and Type | Method and Description |
|---|---|
com.fasterxml.jackson.dataformat.cbor.CBORParser |
getCBORParser()
Returns the CBORParser used for parsing the RpcV2Cbor document.
|
int |
getCurrentDepth()
Returns the element depth of the parser's current position in the RPCV2CBOR
document being parsed.
|
String |
getCurrentParentElement()
Returns the name of the RPCV2CBOR field that is the nearest parent of the
current context.Returns null by default.
|
com.fasterxml.jackson.core.JsonToken |
getCurrentToken()
Returns the current JsonToken that is to be parsed by the parser.
|
String |
getHeader(String header)
Returns the value of the header with the specified name from the
response, or null if not present.
|
HttpResponse |
getHttpResponse()
Returns the original HttpResponse constructed for this request.
|
String |
getLastParsedParentElement()
This will return the deleted string in stackString when doing update on
the stack.
|
Map<String,String> |
getMetadata()
Returns any metadata collected through metadata expressions while this
context was reading the RPCV2CBOR events from the RPCV2CBOR document.
|
<T> Unmarshaller<T,RpcV2CborUnmarshallerContext> |
getUnmarshaller(Class<T> type)
Returns the RpcV2CborUnmarshaller for the specified scalar type.
|
<T> Unmarshaller<T,RpcV2CborUnmarshallerContext> |
getUnmarshaller(Class<T> type,
RpcV2CborUnmarshallerContext.UnmarshallerType unmarshallerType)
Returns the RpcV2CborUnmarshaller for requested custom unmarshaller type.
|
boolean |
isInsideResponseHeader()
Returns true if the
RpcV2CborUnmarshallerContext is involved in
parsing response headers. |
boolean |
isStartOfDocument()
Returns true if parsing of the RpcV2Cbor document is yet to start.
|
com.fasterxml.jackson.core.JsonToken |
nextToken()
Returns the next JsonToken from the CBORParser.
|
com.fasterxml.jackson.core.JsonToken |
peek()
Returns the JsonToken which is to be parsed next.
|
String |
readText()
Returns the text of the current token, or throws an exception if the
current token does not contain text (ex: '{', '}', etc.).
|
void |
setCurrentHeader(String currentHeader)
Sets the name of the response header that is to be read next.
|
boolean |
testExpression(String expression)
Tests the specified expression (a RPCV2CBOR field name) against the current
position in the RPCV2CBOR document being parsed.
|
boolean |
testExpression(String expression,
int stackDepth)
Tests the specified expression (a RPCV2CBOR field name) against the current
position in the RPCV2CBOR document being parsed, and restricts the expression
to matching at the specified stack depth.
|
String |
toString() |
registerMetadataExpressionpublic RpcV2CborUnmarshallerContextImpl(com.fasterxml.jackson.dataformat.cbor.CBORParser cborParser,
Map<Class<?>,Unmarshaller<?,RpcV2CborUnmarshallerContext>> mapper,
HttpResponse httpResponse)
public RpcV2CborUnmarshallerContextImpl(com.fasterxml.jackson.dataformat.cbor.CBORParser cborParser,
Map<Class<?>,Unmarshaller<?,RpcV2CborUnmarshallerContext>> mapper,
Map<RpcV2CborUnmarshallerContext.UnmarshallerType,Unmarshaller<?,RpcV2CborUnmarshallerContext>> customUnmarshallerMap,
HttpResponse httpResponse)
public String getHeader(String header)
RpcV2CborUnmarshallerContextgetHeader in class RpcV2CborUnmarshallerContextheader - The name of the header to lookup.public HttpResponse getHttpResponse()
RpcV2CborUnmarshallerContextgetHttpResponse in class RpcV2CborUnmarshallerContextpublic int getCurrentDepth()
RpcV2CborUnmarshallerContextgetCurrentDepth in class RpcV2CborUnmarshallerContextpublic String readText() throws IOException
RpcV2CborUnmarshallerContextreadText in class RpcV2CborUnmarshallerContextIOExceptionpublic boolean isInsideResponseHeader()
RpcV2CborUnmarshallerContextRpcV2CborUnmarshallerContext is involved in
parsing response headers. Else returns false. Returns true by default.isInsideResponseHeader in class RpcV2CborUnmarshallerContextpublic boolean isStartOfDocument()
RpcV2CborUnmarshallerContextisStartOfDocument in class RpcV2CborUnmarshallerContextpublic boolean testExpression(String expression)
RpcV2CborUnmarshallerContexttestExpression in class RpcV2CborUnmarshallerContextexpression - The field name to test.public String getCurrentParentElement()
RpcV2CborUnmarshallerContextgetCurrentParentElement in class RpcV2CborUnmarshallerContextpublic boolean testExpression(String expression, int stackDepth)
RpcV2CborUnmarshallerContexttestExpression in class RpcV2CborUnmarshallerContextexpression - The field name to test.stackDepth - The depth in the stack representing where the expression must
start matching in order for this method to return true.public com.fasterxml.jackson.core.JsonToken nextToken()
throws IOException
RpcV2CborUnmarshallerContextnextToken in class RpcV2CborUnmarshallerContextIOExceptionpublic com.fasterxml.jackson.core.JsonToken peek()
throws IOException
RpcV2CborUnmarshallerContextpeek in class RpcV2CborUnmarshallerContextIOExceptionpublic com.fasterxml.jackson.dataformat.cbor.CBORParser getCBORParser()
RpcV2CborUnmarshallerContextgetCBORParser in class RpcV2CborUnmarshallerContextpublic Map<String,String> getMetadata()
RpcV2CborUnmarshallerContextgetMetadata in class RpcV2CborUnmarshallerContextpublic void setCurrentHeader(String currentHeader)
RpcV2CborUnmarshallerContextsetCurrentHeader in class RpcV2CborUnmarshallerContextpublic <T> Unmarshaller<T,RpcV2CborUnmarshallerContext> getUnmarshaller(Class<T> type)
RpcV2CborUnmarshallerContextgetUnmarshaller in class RpcV2CborUnmarshallerContextpublic <T> Unmarshaller<T,RpcV2CborUnmarshallerContext> getUnmarshaller(Class<T> type, RpcV2CborUnmarshallerContext.UnmarshallerType unmarshallerType)
RpcV2CborUnmarshallerContextgetUnmarshaller in class RpcV2CborUnmarshallerContextpublic com.fasterxml.jackson.core.JsonToken getCurrentToken()
RpcV2CborUnmarshallerContextgetCurrentToken in class RpcV2CborUnmarshallerContextpublic String getLastParsedParentElement()
RpcV2CborUnmarshallerContextgetLastParsedParentElement in class RpcV2CborUnmarshallerContextCopyright © 2025. All rights reserved.