public class OriginAuthorizers
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static OriginAuthorizer |
FALSE
OriginAuthorizer which always denies access.
|
private static java.util.logging.Logger |
logger_ |
static OriginAuthorizer |
SWING
OriginAuthorizer which queries the user via a popup dialogue.
|
static OriginAuthorizer |
TRUE
OriginAuthorizer which always permits access.
|
Modifier | Constructor and Description |
---|---|
private |
OriginAuthorizers()
Private constructor prevents instantiation.
|
Modifier and Type | Method and Description |
---|---|
static OriginAuthorizer |
createFixedOriginAuthorizer(boolean individualPolicy,
boolean generalPolicy)
Returns an OriginAuthorizer with fixed responses, regardless of input.
|
static OriginAuthorizer |
createLoggingOriginAuthorizer(OriginAuthorizer auth,
java.util.logging.Level acceptLevel,
java.util.logging.Level refuseLevel)
Returns an OriginAuthorizer based on an existing one which logs
responses.
|
static OriginAuthorizer |
createMemoryOriginAuthorizer(OriginAuthorizer auth)
Returns an OriginAuthorizer based on an existing one which caches
responses.
|
public static final OriginAuthorizer FALSE
public static final OriginAuthorizer TRUE
public static final OriginAuthorizer SWING
private static final java.util.logging.Logger logger_
private OriginAuthorizers()
public static OriginAuthorizer createFixedOriginAuthorizer(boolean individualPolicy, boolean generalPolicy)
individualPolicy
- invariable response of
authorize
methodgeneralPolicy
- invariable response of
authorizeAll
methodpublic static OriginAuthorizer createLoggingOriginAuthorizer(OriginAuthorizer auth, java.util.logging.Level acceptLevel, java.util.logging.Level refuseLevel)
auth
- base authorizeracceptLevel
- level at which acceptances will be loggedrefuseLevel
- level at which refusals will be loggedpublic static OriginAuthorizer createMemoryOriginAuthorizer(OriginAuthorizer auth)
auth
- base authorizer