次の方法で共有


CodePackageActivationContext Interface

public interface CodePackageActivationContext

Represents activation context for the Service Fabric service. This is valid for fabric activated service only.

Method Summary

Modifier and Type Method and Description
String getApplicationName()

Gets the name of the application.

String getApplicationTypeName()

Gets the name of the application type.

Observable<PackageAddedEventArgs<CodePackage>> getCodePackageAddedEvent()

CodePackageAddedEvent should be used to register listeners to listen to the events that are generated on adding new Code package to service manifest.

Observable<PackageModifiedEventArgs<CodePackage>> getCodePackageModifiedEvent()

CodePackageRemovedEvent should be used to register listeners to listen to the events that are generated on modifying a Code package in the service manifest.

String getCodePackageName()

Gets the name of the fabric activated code package.

List<String> getCodePackageNames()

Retrieves the list of code package names in the service manifest.

CodePackage getCodePackageObject(String packageName)

Returns the CodePackage object from Service Package that matches the packageName parameter

Observable<PackageRemovedEventArgs<CodePackage>> getCodePackageRemovedEvent()

CodePackageRemovedEvent should be used to register listeners to listen to the events that are generated on removing a Code package in the service manifest.

String getCodePackageVersion()

Gets the version of the fabric activated code package

Observable<PackageAddedEventArgs<ConfigurationPackage>> getConfigurationPackageAddedEvent()

ConfigurationPackageAddedEvent should be used to register listeners to listen to the events that are generated on adding new Config package to service manifest.

Observable<PackageModifiedEventArgs<ConfigurationPackage>> getConfigurationPackageModifiedEvent()

ConfigurationPackageAddedEvent should be used to register listeners to listen to the events that are generated on modifying a Config package in the service manifest.

List<String> getConfigurationPackageNames()

Retrieves the list of configuration package names in the service manifest.

ConfigurationPackage getConfigurationPackageObject(String packageName)

Returns ConfigurationPackage object from Service Package that matches the packageName parameter

Observable<PackageRemovedEventArgs<ConfigurationPackage>> getConfigurationPackageRemovedEvent()

ConfigurationPackageAddedEvent should be used to register listeners to listen to the events that are generated on removing a Config package in the service manifest.

String getContextId()

Gets the ID that represents the service package name qualified with Application package name.

Observable<PackageAddedEventArgs<DataPackage>> getDataPackageAddedEvent()

DataPackageAddedEvent should be used to register listeners to listen to the events that are generated on adding new Data package to service manifest.

Observable<PackageModifiedEventArgs<DataPackage>> getDataPackageModifiedEvent()

DataPackageAddedEvent should be used to register listeners to listen to the events that are generated on modifying a Data package in the service manifest.

List<String> getDataPackageNames()

Retrieves all data packages by name.

DataPackage getDataPackageObject(String packageName)

Returns DataPackage object from Service Package that matches the packageName parameter

Observable<PackageRemovedEventArgs<DataPackage>> getDataPackageRemovedEvent()

DataPackageAddedEvent should be used to register listeners to listen to the events that are generated on removing a Data package in the service manifest.

EndpointResourceDescription getEndpoint(String endpointName)

Retrieves the endpoint by name.

LinkedHashMap<String, EndpointResourceDescription> getEndpoints()

Retrieves all the end point names in the service manifest.

String getLogDirectory()

Gets the path to the log directory that the application can use.

String getServiceListenAddress()

The address at which the service should start the communication listener.

String getServiceManifestName()

Retrieves the name of the service manifest.

String getServiceManifestVersion()

Retrieves the version of the service manifest.

String getServicePublishAddress()

The address which the service should publish as the listen address.

LinkedHashMap<String, ServiceTypeDescription> getServiceTypes()

Retrieves the list of Service Group types in the service manifest.

String getTempDirectory()

Gets the path to the Temp directory that the Application can use.

String getWorkDirectory()

Gets the path to the Work directory that the Application can use.

void reportApplicationHealth(HealthInformation healthInfo)

Reports health for current application.

void reportDeployedApplicationHealth(HealthInformation healthInfo)

Reports health for current deployed application.

void reportDeployedServicePackageHealth(HealthInformation healthInfo)

Reports health for current deployed service package.

Method Details

getApplicationName

public String getApplicationName()

Gets the name of the application.

Returns:

The name of the application.

getApplicationTypeName

public String getApplicationTypeName()

Gets the name of the application type.

Returns:

The name of the application type.

getCodePackageAddedEvent

public Observable> getCodePackageAddedEvent()

CodePackageAddedEvent should be used to register listeners to listen to the events that are generated on adding new Code package to service manifest.

Returns:

Getter for the CodePackageAddedEvent Observable<T>.

getCodePackageModifiedEvent

public Observable> getCodePackageModifiedEvent()

CodePackageRemovedEvent should be used to register listeners to listen to the events that are generated on modifying a Code package in the service manifest.

Returns:

Getter for the CodePackageRemovedEvent Observable<T>.

getCodePackageName

public String getCodePackageName()

Gets the name of the fabric activated code package.

Returns:

The name of the fabric activated code package.

getCodePackageNames

public List getCodePackageNames()

Retrieves the list of code package names in the service manifest.

Returns:

The list of code package names in the service manifest.

getCodePackageObject

public CodePackage getCodePackageObject(String packageName)

Returns the CodePackage object from Service Package that matches the packageName parameter

Parameters:

packageName - Name of the CodePackage

Returns:

returns CodePackage

getCodePackageRemovedEvent

public Observable> getCodePackageRemovedEvent()

CodePackageRemovedEvent should be used to register listeners to listen to the events that are generated on removing a Code package in the service manifest.

Returns:

Getter for the CodePackageRemovedEvent Observable<T>.

getCodePackageVersion

public String getCodePackageVersion()

Gets the version of the fabric activated code package

Returns:

The version of the fabric activated code package.

getConfigurationPackageAddedEvent

public Observable> getConfigurationPackageAddedEvent()

ConfigurationPackageAddedEvent should be used to register listeners to listen to the events that are generated on adding new Config package to service manifest.

Returns:

Getter for the ConfigurationPackageAddedEvent Observable<T>.

getConfigurationPackageModifiedEvent

public Observable> getConfigurationPackageModifiedEvent()

ConfigurationPackageAddedEvent should be used to register listeners to listen to the events that are generated on modifying a Config package in the service manifest.

Returns:

Getter for the ConfigurationPackageAddedEvent Observable<T>.

getConfigurationPackageNames

public List getConfigurationPackageNames()

Retrieves the list of configuration package names in the service manifest.

Returns:

The list of configuration package names in the service manifest.

getConfigurationPackageObject

public ConfigurationPackage getConfigurationPackageObject(String packageName)

Returns ConfigurationPackage object from Service Package that matches the packageName parameter

Parameters:

packageName - Name of the ConfigurationPackage

Returns:

getConfigurationPackageRemovedEvent

public Observable> getConfigurationPackageRemovedEvent()

ConfigurationPackageAddedEvent should be used to register listeners to listen to the events that are generated on removing a Config package in the service manifest.

Returns:

Getter for the ConfigurationPackageAddedEvent Observable<T>.

getContextId

public String getContextId()

Gets the ID that represents the service package name qualified with Application package name.

Returns:

The context ID.

getDataPackageAddedEvent

public Observable> getDataPackageAddedEvent()

DataPackageAddedEvent should be used to register listeners to listen to the events that are generated on adding new Data package to service manifest.

Returns:

Getter for the DataPackageAddedEvent Observable<T>.

getDataPackageModifiedEvent

public Observable> getDataPackageModifiedEvent()

DataPackageAddedEvent should be used to register listeners to listen to the events that are generated on modifying a Data package in the service manifest.

Returns:

Getter for the DataPackageAddedEvent Observable<T>.

getDataPackageNames

public List getDataPackageNames()

Retrieves all data packages by name.

Returns:

A list of data packages.

getDataPackageObject

public DataPackage getDataPackageObject(String packageName)

Returns DataPackage object from Service Package that matches the packageName parameter

Parameters:

packageName - Name of the DataPackage

Returns:

Returns DataPackage object from Service Package that matches the packageName parameter.

getDataPackageRemovedEvent

public Observable> getDataPackageRemovedEvent()

DataPackageAddedEvent should be used to register listeners to listen to the events that are generated on removing a Data package in the service manifest.

Returns:

Getter for the DataPackageAddedEvent Observable<T>.

getEndpoint

public EndpointResourceDescription getEndpoint(String endpointName)

Retrieves the endpoint by name.

Parameters:

endpointName - The name of the endpoint.

Returns:

The endpoint with a specified name.

getEndpoints

public LinkedHashMap getEndpoints()

Retrieves all the end point names in the service manifest.

Returns:

The end point names in the service manifest.

getLogDirectory

public String getLogDirectory()

Gets the path to the log directory that the application can use.

Returns:

The path to the application logs directory.

getServiceListenAddress

public String getServiceListenAddress()

The address at which the service should start the communication listener.

Returns:

The address at which the service should start the communication listener

getServiceManifestName

public String getServiceManifestName()

Retrieves the name of the service manifest.

Returns:

The name of the service manifest.

getServiceManifestVersion

public String getServiceManifestVersion()

Retrieves the version of the service manifest.

Returns:

The version of the service manifest.

getServicePublishAddress

public String getServicePublishAddress()

The address which the service should publish as the listen address.

Returns:

The address which the service should publish as the listen address.

getServiceTypes

public LinkedHashMap getServiceTypes()

Retrieves the list of Service Group types in the service manifest.

Returns:

The list of Service Group types in the service manifest.

getTempDirectory

public String getTempDirectory()

Gets the path to the Temp directory that the Application can use.

Returns:

The path to the Temp directory.

getWorkDirectory

public String getWorkDirectory()

Gets the path to the Work directory that the Application can use.

Returns:

The path to the Work directory.

reportApplicationHealth

public void reportApplicationHealth(HealthInformation healthInfo)

Reports health for current application.

Parameters:

healthInfo - Health information that is to be reported.

reportDeployedApplicationHealth

public void reportDeployedApplicationHealth(HealthInformation healthInfo)

Reports health for current deployed application.

Parameters:

healthInfo - Health information that is to be reported.

reportDeployedServicePackageHealth

public void reportDeployedServicePackageHealth(HealthInformation healthInfo)

Reports health for current deployed service package.

Parameters:

healthInfo - Health information that is to be reported.

Applies to