Skip to content
Permalink
Browse files
Fixed many Javadoc issues
  • Loading branch information
elecharny committed Mar 6, 2019
1 parent 2a77152 commit 2d0c5ebaef3e14149348bc7fca8e38b84f233695
Show file tree
Hide file tree
Showing 25 changed files with 109 additions and 43 deletions.
@@ -59,7 +59,9 @@ public int getPos()


/**
* @return The current position in the buffer
* Set the current position in the buffer
*
* @param pos The position to move the buffer to
*/
public void setPos( int pos )
{
@@ -106,6 +108,8 @@ public void put( byte[] bytes )

/**
* Extend the buffer
*
* @param size The new buffer size
*/
private void extend( int size )
{
@@ -226,6 +226,7 @@ public static int parseAndVerifyRequestID( String attributeValue, XmlPullParser
* @param codec The LDAP Service to use
* @param element the element to add the Controls to
* @param controls a List of Controls
* @param isRequest A flag set to <tt>true</tt> if teh LDapMessage is a request
*/
public static void addControls( LdapApiService codec, Element element, Collection<Control> controls, boolean isRequest )
{
@@ -110,9 +110,9 @@ public LdapClientTrustStoreManager( String trustStoreFile, char[] trustStorePw,
/**
* Determine if client certificate is to be trusted.
*
* @param x509Chain
* @param authNType
* @throws CertificateException
* @param x509Chain The certificate chain
* @param authNType The key exchange algorithm being used
* @throws CertificateException If the trustManager cannot be found
*/
public synchronized void checkClientTrusted( X509Certificate[] x509Chain, String authNType ) throws CertificateException
{
@@ -127,9 +127,9 @@ public synchronized void checkClientTrusted( X509Certificate[] x509Chain, String
/**
* Determine if server certificate is to be trusted.
*
* @param x509Chain
* @param authNType
* @throws CertificateException
* @param x509Chain The certificate chain
* @param authNType The key exchange algorithm being used
* @throws CertificateException If the trustManager cannot be found
*/
public synchronized void checkServerTrusted( X509Certificate[] x509Chain, String authNType ) throws
CertificateException
@@ -344,7 +344,7 @@ private KeyStore getTrustStore() throws CertificateException
* Read the trust store off the classpath.
*
* @return handle to inputStream containing the trust store
* @throws CertificateException
* @throws CertificateException If the file cannot be found
*/
private InputStream getTrustStoreInputStream() throws CertificateException
{
@@ -2459,6 +2459,11 @@ private boolean isNoticeOfDisconnect( Message message )

/**
* Process the AddResponse received from the server
*
* @param addResponse The AddResponse to process
* @param addFuture The AddFuture to feed
* @param responseId The associated request message ID
* @throws InterruptedException If the Future is interrupted
*/
private void addReceived( AddResponse addResponse, AddFuture addFuture, int responseId ) throws InterruptedException
{
@@ -2487,8 +2492,14 @@ private void addReceived( AddResponse addResponse, AddFuture addFuture, int resp

/**
* Process the BindResponse received from the server
*
* @param bindResponse The BindResponse to process
* @param bindFuture The BindFuture to feed
* @param responseId The associated request message ID
* @throws InterruptedException If the Future is interrupted
*/
private void bindReceived( BindResponse bindResponse, BindFuture bindFuture, int responseId ) throws InterruptedException
private void bindReceived( BindResponse bindResponse, BindFuture bindFuture, int responseId )
throws InterruptedException
{
// remove the listener from the listener map
if ( bindResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
@@ -2520,8 +2531,14 @@ private void bindReceived( BindResponse bindResponse, BindFuture bindFuture, int

/**
* Process the CompareResponse received from the server
*
* @param compareResponse The CompareResponse to process
* @param compareFuture The CompareFuture to feed
* @param responseId The associated request message ID
* @throws InterruptedException If the Future is interrupted
*/
private void compareReceived( CompareResponse compareResponse, CompareFuture compareFuture, int responseId ) throws InterruptedException
private void compareReceived( CompareResponse compareResponse, CompareFuture compareFuture, int responseId )
throws InterruptedException
{
// remove the listener from the listener map
if ( LOG.isDebugEnabled() )
@@ -2548,8 +2565,14 @@ private void compareReceived( CompareResponse compareResponse, CompareFuture com

/**
* Process the DeleteResponse received from the server
*
* @param deleteResponse The DeleteResponse to process
* @param deleteFuture The DeleteFuture to feed
* @param responseId The associated request message ID
* @throws InterruptedException If the Future is interrupted
*/
private void deleteReceived( DeleteResponse deleteResponse, DeleteFuture deleteFuture, int responseId ) throws InterruptedException
private void deleteReceived( DeleteResponse deleteResponse, DeleteFuture deleteFuture, int responseId )
throws InterruptedException
{
if ( LOG.isDebugEnabled() )
{
@@ -2575,6 +2598,12 @@ private void deleteReceived( DeleteResponse deleteResponse, DeleteFuture deleteF

/**
* Process the ExtendedResponse received from the server
*
* @param extendedResponse The ExtendedResponse to process
* @param extendedFuture The ExtendedFuture to feed
* @param responseId The associated request message ID
* @throws InterruptedException If the Future is interrupted
* @throws DecoderException If the response cannot be decoded
*/
private void extendedReceived( ExtendedResponse extendedResponse, ExtendedFuture extendedFuture, int responseId )
throws InterruptedException, DecoderException
@@ -2605,6 +2634,10 @@ private void extendedReceived( ExtendedResponse extendedResponse, ExtendedFuture

/**
* Process the IntermediateResponse received from the server
*
* @param intermediateResponse The IntermediateResponse to process
* @param responseFuture The ResponseFuture to feed
* @throws InterruptedException If the Future is interrupted
*/
private void intermediateReceived( IntermediateResponse intermediateResponse, ResponseFuture<? extends Response> responseFuture )
throws InterruptedException
@@ -2631,6 +2664,11 @@ else if ( responseFuture instanceof ExtendedFuture )

/**
* Process the ModifyResponse received from the server
*
* @param modifyResponse The ModifyResponse to process
* @param modifyFuture The ModifyFuture to feed
* @param responseId The associated request message ID
* @throws InterruptedException If the Future is interrupted
*/
private void modifyReceived( ModifyResponse modifyResponse, ModifyFuture modifyFuture, int responseId )
throws InterruptedException
@@ -2665,6 +2703,11 @@ private void modifyReceived( ModifyResponse modifyResponse, ModifyFuture modifyF

/**
* Process the ModifyDnResponse received from the server
*
* @param modifyDnResponse The ModifyDnResponse to process
* @param modifyDnFuture The ModifyDnFuture to feed
* @param responseId The associated request message ID
* @throws InterruptedException If the Future is interrupted
*/
private void modifyDnReceived( ModifyDnResponse modifyDnResponse, ModifyDnFuture modifyDnFuture, int responseId )
throws InterruptedException
@@ -2693,6 +2736,11 @@ private void modifyDnReceived( ModifyDnResponse modifyDnResponse, ModifyDnFuture

/**
* Process the SearchResultDone received from the server
*
* @param searchResultDone The SearchResultDone to process
* @param searchFuture The SearchFuture to feed
* @param responseId The associated request message ID
* @throws InterruptedException If the Future is interrupted
*/
private void searchResultDoneReceived( SearchResultDone searchResultDone, SearchFuture searchFuture,
int responseId ) throws InterruptedException
@@ -2721,6 +2769,11 @@ private void searchResultDoneReceived( SearchResultDone searchResultDone, Search

/**
* Process the SearchResultEntry received from the server
*
* @param searchResultEntry The SearchResultEntry to process
* @param searchFuture The SearchFuture to feed
* @throws InterruptedException If the Future is interrupted
* @throws LdapException If we weren't able to create a new Entry
*/
private void searchResultEntryReceived( SearchResultEntry searchResultEntry, SearchFuture searchFuture )
throws InterruptedException, LdapException
@@ -2742,9 +2795,13 @@ private void searchResultEntryReceived( SearchResultEntry searchResultEntry, Sea

/**
* Process the SearchResultEntry received from the server
*
* @param searchResultReference The SearchResultReference to process
* @param searchFuture The SearchFuture to feed
* @throws InterruptedException If the Future is interrupted
*/
private void searchResultReferenceReceived( SearchResultReference searchResultReference, SearchFuture searchFuture )
throws InterruptedException, LdapException
throws InterruptedException
{
if ( LOG.isDebugEnabled() )
{
@@ -70,7 +70,7 @@ protected PasswordException exception( LdapException e )
* <code>resultCode</code>.
*
* @param resultResponse The result response
* @param passwordPolicy The password policy in use
* @param passwordPolicyResponse The password policy in use
* @param resultCode The result
* @return The created PasswordException
*/
@@ -66,8 +66,6 @@ private StockCodecFactoryUtil()
/**
* Loads the Controls implement out of the box in the codec.
*
* @param requestControlFactories The Request Control factories to use
* @param responseControlFactories The Response Control factories to use
* @param apiService The LDAP Service instance to use
*/
public static void loadStockControls( LdapApiService apiService )
@@ -42,7 +42,7 @@
* <pre>
* Control ::= SEQUENCE {
* controlType LDAPOID,
* ...LdapMessageContainerDirect<Message>
* ...LdapMessageContainerDirect&lt;Message&gt;
* </pre>
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -46,6 +46,7 @@
* Creates a new instance of AbstractControlFactory.
*
* @param codec The LdapApiSevice instance
* @param oid The control's OID
*/
protected AbstractControlFactory( LdapApiService codec, String oid )
{
@@ -68,6 +68,7 @@
* @param container The Asn1Container containing the control to feed
* @param control The control to feed
* @param controlBytes The data to decode
* @throws DecoderException If the value can't be decoded
*/
void decodeValue( ControlContainer container, Control control, byte[] controlBytes ) throws DecoderException;

@@ -77,6 +78,7 @@
*
* @param control The control to feed
* @param controlBytes The data to decode
* @throws DecoderException If the value can't be decoded
*/
void decodeValue( Control control, byte[] controlBytes ) throws DecoderException;
}
@@ -65,6 +65,7 @@
* Creates a new ExtendedResponse, for the ExtendedRequest with no value
*
* @return The new ExtendedResponse.
* @throws DecoderException If the response cannot be decoded
*/
ExtendedResponse newResponse() throws DecoderException;

@@ -94,6 +95,7 @@
*
* @param extendedRequest The ExtendedRequest Operation to feed
* @param requestValue The request value to decode
* @throws DecoderException If the value cannot be decoded
*/
void decodeValue( ExtendedRequest extendedRequest, byte[] requestValue ) throws DecoderException;

@@ -112,6 +114,7 @@
*
* @param extendedResponse The ExtendedResponse Operation to feed
* @param responseValue The response value to decode
* @throws DecoderException If the value cannot be decoded
*/
void decodeValue( ExtendedResponse extendedResponse, byte[] responseValue ) throws DecoderException;
}
@@ -62,16 +62,17 @@
* Encode the value part of the intermediate response operation.
*
* @param buffer The buffer into which to put the encoded value
* @param IntermediateResponse The IntermediateResponse Operation to encode
* @param intermediateResponse The IntermediateResponse Operation to encode
*/
void encodeValue( Asn1Buffer buffer, IntermediateResponse intermediateResponse );


/**
* Decode the value part of the intermediate response operation.
*
* @param IntermediateResponse The IntermediateResponse Operation to feed
* @param responseValue The response bvalue to decode
* @param intermediateResponse The IntermediateResponse Operation to feed
* @param responseValue The response value to decode
* @throws DecoderException If the value cannot be decoded
*/
void decodeValue( IntermediateResponse intermediateResponse, byte[] responseValue ) throws DecoderException;
}
@@ -85,8 +85,10 @@ private LdapEncoder()
*
*
* @param buffer The buffer that will contain the encoded control
* @param control The control to encode
* @return The control encoded in a byte[]
* @param codec The LdapApiService instance
* @param controls The controls to encode
* @param iterator The Iterator instance we are processing
* @param isRequest A flag set to <tt>true</tt> if the LdapMessage is a request
* @throws EncoderException If the encoding failed
*/
private static void encodeControls( Asn1Buffer buffer, LdapApiService codec,
@@ -264,6 +266,7 @@ private static void encodeProtocolOp( Asn1Buffer buffer, LdapApiService codec, M
* LdapMessageLength = Length(0x30) + Length(L1) + L1
* </pre>
*
* @param buffer The Asn1Buffer instance in which we store the temporary result
* @param codec The LdapApiService instance
* @param message The message to encode
* @return A ByteBuffer that contains the PDU
@@ -406,8 +406,6 @@ public void addCurrentFilter( Filter localFilter ) throws DecoderException
* is considered as terminated either if :
* - it's a final element (ie an element which cannot contains a Filter)
* - its current length equals its expected length.
*
* @param container The container being decoded
*/
public void unstackFilters()
{
@@ -28,7 +28,7 @@
import org.apache.directory.api.ldap.model.message.controls.OpaqueControl;

/**
* A codec {@link ControlFactory} implementation for {@link Opaque} controls.
* A codec {@link ControlFactory} implementation for opaque controls.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$, $Date$
@@ -39,7 +39,7 @@ public class OpaqueControlFactory extends AbstractControlFactory<Control>
* Creates a new instance of OpaqueControlFactory.
*
* @param codec The LDAP codec.
* @param the control to create
* @param oid The Control's OID
*/
public OpaqueControlFactory( LdapApiService codec, String oid )
{
@@ -63,7 +63,7 @@ public PersistentSearch getPersistentSearch()
* Set a PSearchControl Object into the container. It will be completed by
* the ldapDecoder.
*
* @param decorator the PSearchControl to set.
* @param control the PSearchControl to set.
*/
public void setControl( Control control )
{

0 comments on commit 2d0c5eb

Please sign in to comment.