Class StartTlsFactory
- java.lang.Object
-
- org.apache.directory.api.ldap.extras.extended.ads_impl.startTls.StartTlsFactory
-
- All Implemented Interfaces:
ExtendedOperationFactory
public class StartTlsFactory extends Object implements ExtendedOperationFactory
AnExtendedOperationFactory
for creating SartTls extended reques/response pairs.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description StartTlsFactory(LdapApiService codec)
Creates a new instance of StartTlsFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StartTlsRequestDecorator
decorate(ExtendedRequest modelRequest)
Decorates a non-decorated request.StartTlsResponseDecorator
decorate(ExtendedResponse decoratedResponse)
Decorates an ExtendedResponse which may or may not be of the expected type.String
getOid()
Gets the OID of the extended requests this factory generates.StartTlsRequest
newRequest(byte[] value)
Returns a newExtendedRequestDecorator
with the following encoded value.StartTlsResponse
newResponse(byte[] encodedValue)
Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.
-
-
-
Constructor Detail
-
StartTlsFactory
public StartTlsFactory(LdapApiService codec)
Creates a new instance of StartTlsFactory.- Parameters:
codec
- The codec for this factory.
-
-
Method Detail
-
getOid
public String getOid()
Gets the OID of the extended requests this factory generates.- Specified by:
getOid
in interfaceExtendedOperationFactory
- Returns:
- the extended request OID
-
newResponse
public StartTlsResponse newResponse(byte[] encodedValue) throws DecoderException
Creates a new ExtendedResponse, for the ExtendedRequest with a specific encoded value.- Specified by:
newResponse
in interfaceExtendedOperationFactory
- Parameters:
encodedValue
- The encoded value for the ExtendedResponse instance.- Returns:
- The new ExtendedResponse.
- Throws:
DecoderException
- If we can't decode the response
-
newRequest
public StartTlsRequest newRequest(byte[] value)
Returns a newExtendedRequestDecorator
with the following encoded value.- Specified by:
newRequest
in interfaceExtendedOperationFactory
- Parameters:
value
- the encoded value- Returns:
- the decorator for the extended request type
-
decorate
public StartTlsRequestDecorator decorate(ExtendedRequest modelRequest)
Decorates a non-decorated request.- Specified by:
decorate
in interfaceExtendedOperationFactory
- Parameters:
modelRequest
- the non decorated model request- Returns:
- the decorated model request
-
decorate
public StartTlsResponseDecorator decorate(ExtendedResponse decoratedResponse)
Decorates an ExtendedResponse which may or may not be of the expected type. The factory implementor must check and handle appropriately.- Specified by:
decorate
in interfaceExtendedOperationFactory
- Parameters:
decoratedResponse
- the message to be decorated.- Returns:
- The decorated message
-
-