Add JCIP annotations

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@755461 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-03-18 02:41:04 +00:00
parent 2cc1241ed7
commit de1cead50d
11 changed files with 36 additions and 1 deletions

View File

@ -31,12 +31,15 @@
package org.apache.http.auth;
import net.jcip.annotations.Immutable;
/**
* Constants and static helpers related to the HTTP authentication.
*
*
* @since 4.0
*/
@Immutable
public final class AUTH {
/**

View File

@ -36,6 +36,9 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import net.jcip.annotations.GuardedBy;
import net.jcip.annotations.ThreadSafe;
import org.apache.http.params.HttpParams;
/**
@ -47,8 +50,10 @@ import org.apache.http.params.HttpParams;
* @version $Revision$
* @since 4.0
*/
@ThreadSafe
public final class AuthSchemeRegistry {
@GuardedBy("this")
private final Map<String,AuthSchemeFactory> registeredSchemes;
public AuthSchemeRegistry() {

View File

@ -32,6 +32,8 @@ package org.apache.http.auth;
import java.util.Locale;
import net.jcip.annotations.Immutable;
import org.apache.http.util.LangUtils;
/**
@ -42,6 +44,7 @@ import org.apache.http.util.LangUtils;
*
* @since 4.0
*/
@Immutable
public class AuthScope {
/**

View File

@ -30,6 +30,8 @@
package org.apache.http.auth;
import net.jcip.annotations.NotThreadSafe;
/**
* This class provides detailed information about the state of the
@ -38,6 +40,7 @@ package org.apache.http.auth;
*
* @since 4.0
*/
@NotThreadSafe
public class AuthState {
/** Actual authentication scheme */

View File

@ -30,6 +30,8 @@
package org.apache.http.auth;
import net.jcip.annotations.Immutable;
import org.apache.http.ProtocolException;
/**
@ -38,6 +40,7 @@ import org.apache.http.ProtocolException;
*
* @since 4.0
*/
@Immutable
public class AuthenticationException extends ProtocolException {
private static final long serialVersionUID = -6794031905674764776L;

View File

@ -32,6 +32,8 @@ package org.apache.http.auth;
import java.security.Principal;
import net.jcip.annotations.Immutable;
import org.apache.http.util.LangUtils;
/**
@ -40,6 +42,7 @@ import org.apache.http.util.LangUtils;
*
* @since 4.0
*/
@Immutable
public final class BasicUserPrincipal implements Principal {
private final String username;

View File

@ -30,6 +30,8 @@
package org.apache.http.auth;
import net.jcip.annotations.Immutable;
/**
* Authentication credentials required to respond to a authentication
* challenge are invalid
@ -37,6 +39,7 @@ package org.apache.http.auth;
*
* @since 4.0
*/
@Immutable
public class InvalidCredentialsException extends AuthenticationException {
private static final long serialVersionUID = -4834003835215460648L;

View File

@ -30,6 +30,8 @@
package org.apache.http.auth;
import net.jcip.annotations.Immutable;
import org.apache.http.ProtocolException;
/**
@ -39,6 +41,7 @@ import org.apache.http.ProtocolException;
*
* @since 4.0
*/
@Immutable
public class MalformedChallengeException extends ProtocolException {
private static final long serialVersionUID = 814586927989932284L;

View File

@ -33,6 +33,8 @@ package org.apache.http.auth;
import java.security.Principal;
import java.util.Locale;
import net.jcip.annotations.Immutable;
import org.apache.http.util.LangUtils;
/** {@link Credentials} specific to the Windows platform.
@ -40,6 +42,7 @@ import org.apache.http.util.LangUtils;
*
* @since 2.0
*/
@Immutable
public class NTCredentials implements Credentials {
/** The user principal */

View File

@ -33,6 +33,8 @@ package org.apache.http.auth;
import java.security.Principal;
import java.util.Locale;
import net.jcip.annotations.Immutable;
import org.apache.http.util.LangUtils;
/** NT (MS Windows specific) user principal used for HTTP authentication
@ -40,6 +42,7 @@ import org.apache.http.util.LangUtils;
*
* @since 4.0
*/
@Immutable
public class NTUserPrincipal implements Principal {
private final String username;

View File

@ -32,6 +32,8 @@ package org.apache.http.auth;
import java.security.Principal;
import net.jcip.annotations.Immutable;
import org.apache.http.util.LangUtils;
/**
@ -43,11 +45,12 @@ import org.apache.http.util.LangUtils;
*
* @since 4.0
*/
@Immutable
public class UsernamePasswordCredentials implements Credentials {
private final BasicUserPrincipal principal;
private final String password;
/**
* The constructor with the username and password combined string argument.
*