From 4564c901ffa33fa84c8433d27204d29388a26257 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 16 Aug 2007 00:36:48 +0000
Subject: [PATCH] Update package-info.java files to include the @PublicAPI annotation to indicate whether any or all of the classes in that package are intended to be part of the public API. Further, mark all classes that we intend to be part of the public API with the @PublicAPI annotation to indicate the ways in which they may be used. Note that the use of these annotations and the ultimate determination as to what is in our public API and the ways in which those elements may be used still needs to be carefully reviewed before the 1.0 release.
---
opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java | 182 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 177 insertions(+), 5 deletions(-)
diff --git a/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java b/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
index 5c7b3f9..fe888a4 100644
--- a/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
+++ b/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
@@ -95,7 +95,12 @@
* This class defines a pseudo-connection object that can be used for
* performing internal operations.
*/
-public class InternalClientConnection
+@org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
+ mayInstantiate=true,
+ mayExtend=false,
+ mayInvoke=true)
+public final class InternalClientConnection
extends ClientConnection
{
/**
@@ -234,6 +239,7 @@
super.setAuthenticationInfo(authenticationInfo);
super.setSizeLimit(0);
super.setTimeLimit(0);
+ super.setIdleTimeLimit(0);
super.setLookthroughLimit(0);
}
catch (DirectoryException de)
@@ -282,6 +288,7 @@
super.setAuthenticationInfo(authInfo);
super.setSizeLimit(0);
super.setTimeLimit(0);
+ super.setIdleTimeLimit(0);
super.setLookthroughLimit(0);
connectionID = nextConnectionID.getAndDecrement();
@@ -386,6 +393,7 @@
* @return The unique identifier that has been assigned to this
* connection.
*/
+ @Override()
public long getConnectionID()
{
return connectionID;
@@ -400,6 +408,12 @@
* @return The connection handler that accepted this client
* connection.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public ConnectionHandler getConnectionHandler()
{
return InternalConnectionHandler.getInstance();
@@ -414,6 +428,7 @@
* @return The protocol that the client is using to communicate
* with the Directory Server.
*/
+ @Override()
public String getProtocol()
{
return "internal";
@@ -426,6 +441,7 @@
*
* @return A string representation of the address of the client.
*/
+ @Override()
public String getClientAddress()
{
return "internal";
@@ -440,6 +456,7 @@
* @return A string representation of the address on the server to
* which the client connected.
*/
+ @Override()
public String getServerAddress()
{
return "internal";
@@ -456,6 +473,7 @@
* if the client is not connected over an IP-based
* connection.
*/
+ @Override()
public InetAddress getRemoteAddress()
{
return null;
@@ -472,6 +490,7 @@
* connection. It may be <CODE>null</CODE> if the client
* is not connected over an IP-based connection.
*/
+ @Override()
public InetAddress getLocalAddress()
{
return null;
@@ -480,7 +499,14 @@
/**
- * {@inheritDoc}
+ * Specifies the size limit that will be enforced for searches
+ * performed using this client connection. This method does nothing
+ * because connection-level size limits will never be enforced for
+ * internal client connections.
+ *
+ * @param sizeLimit The size limit that will be enforced for
+ * searches performed using this client
+ * connection.
*/
@Override()
public void setSizeLimit(int sizeLimit)
@@ -492,7 +518,14 @@
/**
- * {@inheritDoc}
+ * Specifies the default maximum number of entries that should
+ * be checked for matches during a search. This method does nothing
+ * because connection-level lookthrough limits will never be
+ * enforced for internal client connections
+ *
+ * @param lookthroughLimit The default maximum number of
+ * entries that should be check for
+ * matches during a search.
*/
@Override()
public void setLookthroughLimit(int lookthroughLimit)
@@ -504,7 +537,35 @@
/**
- * {@inheritDoc}
+ * Specifies the maximum length of time in milliseconds that this
+ * client connection will be allowed to remain idle before it should
+ * be disconnected. This method does nothing because internal
+ * client connections will not be terminated due to an idle time
+ * limit.
+ *
+ * @param idleTimeLimit The maximum length of time in milliseconds
+ * that this client connection will be
+ * allowed to remain idle before it should be
+ * disconnected.
+ */
+ @Override()
+ public void setIdleTimeLimit(long idleTimeLimit)
+ {
+ // No implementation rqeuired. We never want to set a nonzero
+ // idle time limit for internal client connections.
+ }
+
+
+
+ /**
+ * Specifies the time limit that will be enforced for searches
+ * performed using this client connection. This method does nothing
+ * because connection-level tim elimits will never be enforced for
+ * internal client connections.
+ *
+ * @param timeLimit The time limit that will be enforced for
+ * searches performed using this client
+ * connection.
*/
@Override()
public void setTimeLimit(int timeLimit)
@@ -527,6 +588,7 @@
* using a secure mechanism to communicate with the server,
* or <CODE>false</CODE> if not.
*/
+ @Override()
public boolean isSecure()
{
// Internal connections will generally be considered secure, but
@@ -546,6 +608,7 @@
* @return The connection security provider for this client
* connection.
*/
+ @Override()
public ConnectionSecurityProvider getConnectionSecurityProvider()
{
return securityProvider;
@@ -561,6 +624,12 @@
* for communication on this client
* connection.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public void setConnectionSecurityProvider(ConnectionSecurityProvider
securityProvider)
{
@@ -577,6 +646,7 @@
* is used to protect communication with this client, or
* <CODE>null</CODE> if no security is in place.
*/
+ @Override()
public String getSecurityMechanism()
{
return securityProvider.getSecurityMechanismName();
@@ -603,6 +673,12 @@
* <CODE>false</CODE>, then it must have already
* disconnected the client.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public boolean processDataRead(ByteBuffer buffer)
{
// This method will not do anything with the data because there is
@@ -619,6 +695,12 @@
*
* @param operation The operation for which to send the response.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public void sendResponse(Operation operation)
{
// There will not be any response sent by this method, since there
@@ -634,6 +716,7 @@
* @return Information about the user that is currently
* authenticated on this connection.
*/
+ @Override()
public AuthenticationInfo getAuthenticationInfo()
{
return authenticationInfo;
@@ -651,6 +734,12 @@
* connection. It should not be
* <CODE>null</CODE>.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public void setAuthenticationInfo(AuthenticationInfo
authenticationInfo)
{
@@ -664,6 +753,12 @@
* internal client connections is set when the connection is created
* and cannot be changed after the fact.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public void setUnauthenticated()
{
// No implementation required.
@@ -1725,6 +1820,12 @@
* the entry and the search should be
* terminated.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public void sendSearchEntry(SearchOperation searchOperation,
SearchResultEntry searchEntry)
throws DirectoryException
@@ -1752,6 +1853,12 @@
* the entry and the search should be
* terminated.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public boolean sendSearchReference(SearchOperation searchOperation,
SearchResultReference searchReference)
throws DirectoryException
@@ -1773,6 +1880,12 @@
* @return <CODE>true</CODE> if processing on the associated
* operation should continue, or <CODE>false</CODE> if not.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
protected boolean sendIntermediateResponseMessage(
IntermediateResponse intermediateResponse)
{
@@ -1799,6 +1912,12 @@
* may be <CODE>null</CODE> if no
* notification is to be sent.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public void disconnect(DisconnectReason disconnectReason,
boolean sendNotification,
Message message)
@@ -1820,6 +1939,7 @@
* @return <CODE>true</CODE> if a bind operation is in progress on
* this connection, or <CODE>false</CODE> if not.
*/
+ @Override()
public boolean bindInProgress()
{
// For internal operations, we don't care if there are any binds
@@ -1837,6 +1957,12 @@
* @param bindInProgress Specifies whether a bind operation is in
* progress on this client connection.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public void setBindInProgress(boolean bindInProgress)
{
// No implementation is required.
@@ -1851,6 +1977,12 @@
* @return The set of operations in progress for this client
* connection.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public Collection<AbstractOperation> getOperationsInProgress()
{
return operationList;
@@ -1868,6 +2000,12 @@
* or <CODE>null</CODE> if no such operation could be
* found.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public AbstractOperation getOperationInProgress(int messageID)
{
// Internal operations will not be tracked.
@@ -1889,6 +2027,12 @@
* from the set of operations in progress, or
* <CODE>false</CODE> if not.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public boolean removeOperationInProgress(int messageID)
{
// No implementation is required, since internal operations will
@@ -1908,6 +2052,12 @@
* @return A cancel result that either indicates that the cancel
* was successful or provides a reason that it was not.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public CancelResult cancelOperation(int messageID,
CancelRequest cancelRequest)
{
@@ -1923,6 +2073,12 @@
* @param cancelRequest An object providing additional information
* about how the cancel should be processed.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public void cancelAllOperations(CancelRequest cancelRequest)
{
// No implementation is required since internal operations cannot
@@ -1940,6 +2096,12 @@
* @param messageID The message ID of the operation that
* should not be canceled.
*/
+ @org.opends.server.types.PublicAPI(
+ stability=org.opends.server.types.StabilityLevel.PRIVATE,
+ mayInstantiate=false,
+ mayExtend=false,
+ mayInvoke=false)
+ @Override()
public void cancelAllOperationsExcept(CancelRequest cancelRequest,
int messageID)
{
@@ -1950,8 +2112,17 @@
/**
- * {@inheritDoc}
+ * Retrieves a one-line summary of this client connection in a form
+ * that is suitable for including in the monitor entry for the
+ * associated connection handler. It should be in a format that is
+ * both humand readable and machine parseable (e.g., a
+ * space-delimited name-value list, with quotes around the values).
+ *
+ * @return A one-line summary of this client connection in a form
+ * that is suitable for including in the monitor entry for
+ * the associated connection handler.
*/
+ @Override()
public String getMonitorSummary()
{
StringBuilder buffer = new StringBuilder();
@@ -1973,6 +2144,7 @@
* @param buffer The buffer to which the information should be
* appended.
*/
+ @Override()
public void toString(StringBuilder buffer)
{
buffer.append("InternalClientConnection(connID=");
--
Gitblit v1.10.0