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<Package |
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<Package |
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. |
Code |
getCodePackageObject(String packageName)
Returns the CodePackage object from Service Package that matches the packageName parameter |
Observable<Package |
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<Package |
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<Package |
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. |
Configuration |
getConfigurationPackageObject(String packageName)
Returns ConfigurationPackage object from Service Package that matches the packageName parameter |
Observable<Package |
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<Package |
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<Package |
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. |
Data |
getDataPackageObject(String packageName)
Returns DataPackage object from Service Package that matches the packageName parameter |
Observable<Package |
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. |
Endpoint |
getEndpoint(String endpointName)
Retrieves the endpoint by name. |
LinkedHashMap<String, Endpoint |
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, Service |
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:
getApplicationTypeName
public String getApplicationTypeName()
Gets the name of the application type.
Returns:
getCodePackageAddedEvent
public Observable
CodePackageAddedEvent should be used to register listeners to listen to the events that are generated on adding new Code package to service manifest.
Returns:
getCodePackageModifiedEvent
public Observable
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:
getCodePackageName
public String getCodePackageName()
Gets the name of the fabric activated code package.
Returns:
getCodePackageNames
public List
Retrieves the list of code package names in the service manifest.
Returns:
getCodePackageObject
public CodePackage getCodePackageObject(String packageName)
Returns the CodePackage object from Service Package that matches the packageName parameter
Parameters:
Returns:
getCodePackageRemovedEvent
public Observable
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:
getCodePackageVersion
public String getCodePackageVersion()
Gets the version of the fabric activated code package
Returns:
getConfigurationPackageAddedEvent
public Observable
ConfigurationPackageAddedEvent should be used to register listeners to listen to the events that are generated on adding new Config package to service manifest.
Returns:
getConfigurationPackageModifiedEvent
public Observable
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:
getConfigurationPackageNames
public List
Retrieves the list of configuration package names in the service manifest.
Returns:
getConfigurationPackageObject
public ConfigurationPackage getConfigurationPackageObject(String packageName)
Returns ConfigurationPackage object from Service Package that matches the packageName parameter
Parameters:
Returns:
getConfigurationPackageRemovedEvent
public Observable
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:
getContextId
public String getContextId()
Gets the ID that represents the service package name qualified with Application package name.
Returns:
getDataPackageAddedEvent
public Observable
DataPackageAddedEvent should be used to register listeners to listen to the events that are generated on adding new Data package to service manifest.
Returns:
getDataPackageModifiedEvent
public Observable
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:
getDataPackageNames
public List
Retrieves all data packages by name.
Returns:
getDataPackageObject
public DataPackage getDataPackageObject(String packageName)
Returns DataPackage object from Service Package that matches the packageName parameter
Parameters:
Returns:
getDataPackageRemovedEvent
public Observable
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:
getEndpoint
public EndpointResourceDescription getEndpoint(String endpointName)
Retrieves the endpoint by name.
Parameters:
Returns:
getEndpoints
public LinkedHashMap
Retrieves all the end point names in the service manifest.
Returns:
getLogDirectory
public String getLogDirectory()
Gets the path to the log directory that the application can use.
Returns:
getServiceListenAddress
public String getServiceListenAddress()
The address at which the service should start the communication listener.
Returns:
getServiceManifestName
public String getServiceManifestName()
Retrieves the name of the service manifest.
Returns:
getServiceManifestVersion
public String getServiceManifestVersion()
Retrieves the version of the service manifest.
Returns:
getServicePublishAddress
public String getServicePublishAddress()
The address which the service should publish as the listen address.
Returns:
getServiceTypes
public LinkedHashMap
Retrieves the list of Service Group types in the service manifest.
Returns:
getTempDirectory
public String getTempDirectory()
Gets the path to the Temp directory that the Application can use.
Returns:
getWorkDirectory
public String getWorkDirectory()
Gets the path to the Work directory that the Application can use.
Returns:
reportApplicationHealth
public void reportApplicationHealth(HealthInformation healthInfo)
Reports health for current application.
Parameters:
reportDeployedApplicationHealth
public void reportDeployedApplicationHealth(HealthInformation healthInfo)
Reports health for current deployed application.
Parameters:
reportDeployedServicePackageHealth
public void reportDeployedServicePackageHealth(HealthInformation healthInfo)
Reports health for current deployed service package.
Parameters:
Applies to
Azure SDK for Java