public enum DiffusionGatewayFramework extends Enum<DiffusionGatewayFramework>
For full details of the use of the framework see
Package Guide
.
Modifier and Type | Class and Description |
---|---|
static interface |
DiffusionGatewayFramework.Implementation
Do not use - Use static methods on
DiffusionGatewayFramework . |
Enum Constant and Description |
---|
IMPLEMENTATION
Internal type - do not use.
|
Modifier and Type | Method and Description |
---|---|
static String |
mapDiffusionTopic(String path,
String mappingFunction)
Delegator for
mapDiffusionTopic(String, String) . |
static GatewayApplication.ApplicationDetails.Builder |
newApplicationDetailsBuilder()
Factory for an
GatewayApplication.ApplicationDetails builder. |
static SinkHandler.SinkServiceProperties.Builder |
newSinkServicePropertiesBuilder()
Factory for builders of
SinkHandler.SinkServiceProperties . |
static SourceHandler.SourceServiceProperties.Builder |
newSourceServicePropertiesBuilder()
Factory for builders of
SourceHandler.SourceServiceProperties . |
static void |
shutdown()
Shuts down the framework.
|
static GatewayFramework |
start(GatewayApplication application)
Called by an application to introduce a gateway framework application
implementation and start the framework.
|
static DiffusionGatewayFramework |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DiffusionGatewayFramework[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DiffusionGatewayFramework IMPLEMENTATION
public static DiffusionGatewayFramework[] values()
for (DiffusionGatewayFramework c : DiffusionGatewayFramework.values()) System.out.println(c);
public static DiffusionGatewayFramework 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 GatewayFramework start(GatewayApplication application) throws ApplicationInitializationException
This may only be called once per JVM.
When this is called, the framework will call back on the application to
determine its application
details
and then initialize
the
application.
Once the application is initialized, the GatewayFramework
and
the application will be started.
During the start of the framework, a connection with the Diffusion server
will be established, and service types supported by the application
will be registered.
After the connection with the Diffusion server,
start
will be called on the application.
If the connection with the server fails to establish due to a terminal error, such as an authentication error, the framework will throw the corresponding exception and shut down.
application
- the applicationApplicationConfigurationException
- if the passed configuration or
configuration obtained from the server has been found to be invalid
or incompatible with the application;DiffusionSecurityException
- if the application principal
does not have sufficient permissions to perform the operation;DiffusionClientException
- if some other exception has been returned from the
Diffusion server via the Diffusion Client API.
The cause will provide more detail.ApplicationInitializationException
- if the connection with
the Diffusion server fails for any other reason or if initialization fails
for any reason.public static void shutdown()
However, the instance of DiffusionGatewayFramework
created in the
JVM will not be removed and will be reused if the application is
restarted.
This is mostly useful in tests to explicitly clean up resources in the framework.
This method does not need to be called withing the Gateway application, as shutting the application is managed by the framework.
public static GatewayApplication.ApplicationDetails.Builder newApplicationDetailsBuilder()
GatewayApplication.ApplicationDetails
builder.public static SourceHandler.SourceServiceProperties.Builder newSourceServicePropertiesBuilder()
SourceHandler.SourceServiceProperties
.public static SinkHandler.SinkServiceProperties.Builder newSinkServicePropertiesBuilder()
SinkHandler.SinkServiceProperties
.public static String mapDiffusionTopic(String path, String mappingFunction)
mapDiffusionTopic(String, String)
.path
- the topic path to mapmappingFunction
- the function to use to map the path toCopyright © 2024 DiffusionData Limited. All rights reserved.