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:
parent
2cc1241ed7
commit
de1cead50d
|
@ -31,12 +31,15 @@
|
||||||
|
|
||||||
package org.apache.http.auth;
|
package org.apache.http.auth;
|
||||||
|
|
||||||
|
import net.jcip.annotations.Immutable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constants and static helpers related to the HTTP authentication.
|
* Constants and static helpers related to the HTTP authentication.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Immutable
|
||||||
public final class AUTH {
|
public final class AUTH {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -36,6 +36,9 @@ import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import net.jcip.annotations.GuardedBy;
|
||||||
|
import net.jcip.annotations.ThreadSafe;
|
||||||
|
|
||||||
import org.apache.http.params.HttpParams;
|
import org.apache.http.params.HttpParams;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,8 +50,10 @@ import org.apache.http.params.HttpParams;
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@ThreadSafe
|
||||||
public final class AuthSchemeRegistry {
|
public final class AuthSchemeRegistry {
|
||||||
|
|
||||||
|
@GuardedBy("this")
|
||||||
private final Map<String,AuthSchemeFactory> registeredSchemes;
|
private final Map<String,AuthSchemeFactory> registeredSchemes;
|
||||||
|
|
||||||
public AuthSchemeRegistry() {
|
public AuthSchemeRegistry() {
|
||||||
|
|
|
@ -32,6 +32,8 @@ package org.apache.http.auth;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import net.jcip.annotations.Immutable;
|
||||||
|
|
||||||
import org.apache.http.util.LangUtils;
|
import org.apache.http.util.LangUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,6 +44,7 @@ import org.apache.http.util.LangUtils;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Immutable
|
||||||
public class AuthScope {
|
public class AuthScope {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
|
|
||||||
package org.apache.http.auth;
|
package org.apache.http.auth;
|
||||||
|
|
||||||
|
import net.jcip.annotations.NotThreadSafe;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides detailed information about the state of the
|
* This class provides detailed information about the state of the
|
||||||
|
@ -38,6 +40,7 @@ package org.apache.http.auth;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@NotThreadSafe
|
||||||
public class AuthState {
|
public class AuthState {
|
||||||
|
|
||||||
/** Actual authentication scheme */
|
/** Actual authentication scheme */
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
|
|
||||||
package org.apache.http.auth;
|
package org.apache.http.auth;
|
||||||
|
|
||||||
|
import net.jcip.annotations.Immutable;
|
||||||
|
|
||||||
import org.apache.http.ProtocolException;
|
import org.apache.http.ProtocolException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,6 +40,7 @@ import org.apache.http.ProtocolException;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Immutable
|
||||||
public class AuthenticationException extends ProtocolException {
|
public class AuthenticationException extends ProtocolException {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6794031905674764776L;
|
private static final long serialVersionUID = -6794031905674764776L;
|
||||||
|
|
|
@ -32,6 +32,8 @@ package org.apache.http.auth;
|
||||||
|
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
|
|
||||||
|
import net.jcip.annotations.Immutable;
|
||||||
|
|
||||||
import org.apache.http.util.LangUtils;
|
import org.apache.http.util.LangUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,6 +42,7 @@ import org.apache.http.util.LangUtils;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Immutable
|
||||||
public final class BasicUserPrincipal implements Principal {
|
public final class BasicUserPrincipal implements Principal {
|
||||||
|
|
||||||
private final String username;
|
private final String username;
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
|
|
||||||
package org.apache.http.auth;
|
package org.apache.http.auth;
|
||||||
|
|
||||||
|
import net.jcip.annotations.Immutable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authentication credentials required to respond to a authentication
|
* Authentication credentials required to respond to a authentication
|
||||||
* challenge are invalid
|
* challenge are invalid
|
||||||
|
@ -37,6 +39,7 @@ package org.apache.http.auth;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Immutable
|
||||||
public class InvalidCredentialsException extends AuthenticationException {
|
public class InvalidCredentialsException extends AuthenticationException {
|
||||||
|
|
||||||
private static final long serialVersionUID = -4834003835215460648L;
|
private static final long serialVersionUID = -4834003835215460648L;
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
|
|
||||||
package org.apache.http.auth;
|
package org.apache.http.auth;
|
||||||
|
|
||||||
|
import net.jcip.annotations.Immutable;
|
||||||
|
|
||||||
import org.apache.http.ProtocolException;
|
import org.apache.http.ProtocolException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,6 +41,7 @@ import org.apache.http.ProtocolException;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Immutable
|
||||||
public class MalformedChallengeException extends ProtocolException {
|
public class MalformedChallengeException extends ProtocolException {
|
||||||
|
|
||||||
private static final long serialVersionUID = 814586927989932284L;
|
private static final long serialVersionUID = 814586927989932284L;
|
||||||
|
|
|
@ -33,6 +33,8 @@ package org.apache.http.auth;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import net.jcip.annotations.Immutable;
|
||||||
|
|
||||||
import org.apache.http.util.LangUtils;
|
import org.apache.http.util.LangUtils;
|
||||||
|
|
||||||
/** {@link Credentials} specific to the Windows platform.
|
/** {@link Credentials} specific to the Windows platform.
|
||||||
|
@ -40,6 +42,7 @@ import org.apache.http.util.LangUtils;
|
||||||
*
|
*
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
@Immutable
|
||||||
public class NTCredentials implements Credentials {
|
public class NTCredentials implements Credentials {
|
||||||
|
|
||||||
/** The user principal */
|
/** The user principal */
|
||||||
|
|
|
@ -33,6 +33,8 @@ package org.apache.http.auth;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import net.jcip.annotations.Immutable;
|
||||||
|
|
||||||
import org.apache.http.util.LangUtils;
|
import org.apache.http.util.LangUtils;
|
||||||
|
|
||||||
/** NT (MS Windows specific) user principal used for HTTP authentication
|
/** NT (MS Windows specific) user principal used for HTTP authentication
|
||||||
|
@ -40,6 +42,7 @@ import org.apache.http.util.LangUtils;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Immutable
|
||||||
public class NTUserPrincipal implements Principal {
|
public class NTUserPrincipal implements Principal {
|
||||||
|
|
||||||
private final String username;
|
private final String username;
|
||||||
|
|
|
@ -32,6 +32,8 @@ package org.apache.http.auth;
|
||||||
|
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
|
|
||||||
|
import net.jcip.annotations.Immutable;
|
||||||
|
|
||||||
import org.apache.http.util.LangUtils;
|
import org.apache.http.util.LangUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,11 +45,12 @@ import org.apache.http.util.LangUtils;
|
||||||
*
|
*
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Immutable
|
||||||
public class UsernamePasswordCredentials implements Credentials {
|
public class UsernamePasswordCredentials implements Credentials {
|
||||||
|
|
||||||
private final BasicUserPrincipal principal;
|
private final BasicUserPrincipal principal;
|
||||||
private final String password;
|
private final String password;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The constructor with the username and password combined string argument.
|
* The constructor with the username and password combined string argument.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue