public class WhoAmIFactory extends AbstractExtendedOperationFactory
ExtendedOperationFactory
for creating WhoAmI extended request response
pairs.Constructor and Description |
---|
WhoAmIFactory(LdapApiService codec)
Creates a new instance of WhoAmIFactory.
|
Modifier and Type | Method and Description |
---|---|
static WhoAmIResponse |
decode(WhoAmIResponse whoAmIResponse,
byte[] data)
Decode a PDU which must contain a WhoAmIResponse extended operation.
|
void |
decodeValue(ExtendedResponse extendedResponse,
byte[] responseValue)
Decode the value part of the extended response operation.
|
void |
encodeValue(Asn1Buffer buffer,
ExtendedResponse extendedResponse)
Encode the value part of the extended response operation.
|
WhoAmIRequest |
newRequest()
Returns a new
ExtendedRequest with no value |
WhoAmIRequest |
newRequest(byte[] value)
Returns a new
ExtendedRequest with the following encoded value. |
WhoAmIResponse |
newResponse()
Creates a new ExtendedResponse, for the ExtendedRequest with no value
|
WhoAmIResponse |
newResponse(byte[] value)
Creates a new ExtendedResponse, for the ExtendedRequest with a specific
encoded value.
|
decodeValue, encodeValue, getOid
public WhoAmIFactory(LdapApiService codec)
codec
- The codec for this factory.public WhoAmIRequest newRequest()
ExtendedRequest
with no valuepublic WhoAmIRequest newRequest(byte[] value) throws DecoderException
ExtendedRequest
with the following encoded value.newRequest
in interface ExtendedOperationFactory
newRequest
in class AbstractExtendedOperationFactory
value
- the encoded valueDecoderException
- If we can't decode the responsepublic WhoAmIResponse newResponse() throws DecoderException
DecoderException
- If the response cannot be decodedpublic WhoAmIResponse newResponse(byte[] value) throws DecoderException
newResponse
in interface ExtendedOperationFactory
newResponse
in class AbstractExtendedOperationFactory
value
- The encoded value for the ExtendedResponse instance.DecoderException
- If we can't decode the responsepublic void encodeValue(Asn1Buffer buffer, ExtendedResponse extendedResponse)
encodeValue
in interface ExtendedOperationFactory
encodeValue
in class AbstractExtendedOperationFactory
buffer
- The buffer into which to put the encoded valueextendedResponse
- The ExtendedResponse Operation to encodepublic static WhoAmIResponse decode(WhoAmIResponse whoAmIResponse, byte[] data) throws DecoderException
whoAmIResponse
- The WhoAmI extended response that will be feeddata
- The bytes to be decodedDecoderException
- If the decoding failedpublic void decodeValue(ExtendedResponse extendedResponse, byte[] responseValue) throws DecoderException
decodeValue
in interface ExtendedOperationFactory
decodeValue
in class AbstractExtendedOperationFactory
extendedResponse
- The ExtendedResponse Operation to feedresponseValue
- The response value to decodeDecoderException
- If the value cannot be decodedCopyright © 2003–2019 The Apache Software Foundation. All rights reserved.