public enum Diffusion extends Enum<Diffusion>
Modifier and Type | Class and Description |
---|---|
static interface |
Diffusion.Implementation
The contract with the implementation.
|
Enum Constant and Description |
---|
GLOBALS
The implementation.
|
Modifier and Type | Method and Description |
---|---|
static AuthenticationResultSource |
authenticationResult()
Deprecated.
since 6.2
|
static Credentials.Factory |
credentials()
Returns shared credentials factory to use for creating credentials.
|
static DataTypes |
dataTypes()
Returns data type implementations.
|
static String |
escape(String string)
Escapes special characters in a string that is to be used within a topic
property or a session filter.
|
static TopicSpecification |
newTopicSpecification(TopicType topicType)
Create a new
TopicSpecification for a given topic type. |
static ProxyAuthenticationFactory |
proxyAuthentication()
Returns a proxy authentication scheme factory.
|
static String |
rolesToString(Set<String> roles)
Utility method which converts a set of authorisation roles to the string
format required by the
$Roles session property. |
static SessionFactory |
sessions()
Returns the shared session factory.
|
static Set<String> |
stringToRoles(String string)
Utility method which converts a string of the format required by the
$Roles session property into a mutable set of
strings. |
static TopicSelectors |
topicSelectors()
Returns a parser for topic selector expressions.
|
static UpdateConstraint.Factory |
updateConstraints()
Returns an update constraint factory.
|
static Diffusion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Diffusion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Diffusion GLOBALS
public static Diffusion[] values()
for (Diffusion c : Diffusion.values()) System.out.println(c);
public static Diffusion valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static SessionFactory sessions()
public static Credentials.Factory credentials()
public static TopicSelectors topicSelectors()
public static ProxyAuthenticationFactory proxyAuthentication()
@Deprecated public static AuthenticationResultSource authenticationResult()
AuthenticationHandler
is being replaced by the
Authenticator
interface. New authentication handlers
should implement Authenticator
. This method will be
removed in a future release.
AuthenticationResultSource
that can be used by
authentication handlers
as a starting point to create
AuthenticationResult
s.
AuthenticationResultSource
provides a fluent API for creating
authentication results. For example:
// All returned results are derived from this one. AuthenticationResultSource defaultResult = Diffusion.authenticationResult().withRoles("USER"); // ... // The authentication handler grants the new session both the // ADMINISTRATOR and USER roles. AuthenticationResult result = defaultResult.withRoles("ADMINISTATOR"); authenticationHandlerCallback.allow(result);
public static DataTypes dataTypes()
public static String escape(String string)
This is a convenience method which inserts an escape character '\' before any of the special characters ' " or \.
string
- the string to be escapedpublic static TopicSpecification newTopicSpecification(TopicType topicType)
TopicSpecification
for a given topic type.topicType
- the topic typewithProperty
or
withProperties
methods of the provided specification.public static UpdateConstraint.Factory updateConstraints()
public static Set<String> stringToRoles(String string)
$Roles
session property into a mutable set of
strings.string
- the string with quoted roles separated by whitespace or
commaspublic static String rolesToString(Set<String> roles)
$Roles
session property.roles
- a set of roles$Roles
session propertyCopyright © 2020 Push Technology Ltd. All Rights Reserved.