...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Sample Topology Descriptor |
---|
linenumbers | true |
---|
|
<topology>
<gateway>
<provider>
<role>...</role>
<name>...</name>
<!-- Config for the provider. -->
<param><name>...</name><value>...</value></param>
</provider>
<!-- NOTE: There will be a "built-in" "default" chain definition. -->
<chain>
<name>...</name>
<provider-ref>
<role>...</role>
<name>...</name>
<!-- Config for the provider to override those in the provider. -->
<param><name>...</name><value>...</value></param>
</provider-ref>
<provider-ref>...</provider-ref>
</chain>
<chain>...</chain>
</gateway>
<service>
<role>...</role>
<url>...</url>
<chain-ref>
<name>...</name>
<!-- Config for the provider to override those in the chain. -->
<param><role></role><name></name><value></value></param>
</chain-ref>
<!-- Config for the service. -->
<param><name></name><value></value></param>
</service>
</topology>
|
This shows the new method that would be added to the DeploymentContext interface.
The existing contributeFilter method would be deprecated.
This is actually a point worth further discussion.
Is there a use case where a service might want to define a chain this way?
Code Block |
---|
| java |
---|
| java |
---|
title | DeploymentContext |
---|
linenumbers | true |
---|
|
public interface DeploymentContext {
...
@Deprecated
void contributeFilter(
Service service,
ResourceDescriptor resource,
String role,
String name,
List<FilterParamDescriptor> params );
void contributeChain(
Service service,
ResourceDescriptor resource,
List<ServiceParamDescriptor> params );
...
}
|
This shows the relevant portions of the existing, unmodified ServiceDeploymentContributor interface.
Code Block |
---|
| java |
---|
| java |
---|
title | ServiceDeploymentContributor |
---|
linenumbers | true |
---|
|
public interface ServiceDeploymentContributor {
...
// Called per service based on the service's role.
void contributeService( DeploymentContext context, Service service ) throws Exception;
...
}
|
This shows the relevant portions of the existing, unmodified ProviderDeploymentContributor interface.
Code Block |
---|
| java |
---|
| java |
---|
title | ProviderDeploymentContributor |
---|
linenumbers | true |
---|
|
public interface ProviderDeploymentContributor {
...
// This will be called indirectly by a ServiceDeploymentContributor when it asks
// for a chain to be contributed via DeploymentContext.contributeChain.
void contributeFilter(
DeploymentContext context,
Provider provider,
Service service,
ResourceDescriptor resource,
List<FilterParamDescriptor> params );
...
}
|