PTP
Release 5.0

org.eclipse.ptp.services.core
Interface IService

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable

public interface IService
extends org.eclipse.core.runtime.IAdaptable

An interface for arbitrary services. Services can be implemented by one or more providers. EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the RDT team.

See Also:
IServiceProvider

Method Summary
 IServiceCategory getCategory()
          Returns the service category that contains this service or null if the service is not associated with a category.
 java.lang.String getId()
          Get the ID of this service provider.
 java.lang.String getName()
          Get the name of this service provider.
 java.util.Set<java.lang.String> getNatures()
          Get the set of natures that this service applies to.
 IServiceProvider getNullProvider()
          Returns the special null "no-op" service provider, or null if there is none.
 java.lang.Integer getPriority()
          Get the priority of this service.
 IServiceProviderDescriptor getProviderDescriptor(java.lang.String id)
          Gets a specific provider of this service.
 java.util.Set<IServiceProviderDescriptor> getProviders()
          Get the set of all providers for this service.
 java.util.SortedSet<IServiceProviderDescriptor> getProvidersByPriority()
          Return the set of providers sorted by priority
 void removeServiceProvider(IServiceProviderDescriptor provider)
          Remove service provider from list of providers for this service.
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

getId

java.lang.String getId()
Get the ID of this service provider.

Returns:
ID of this service provider

getName

java.lang.String getName()
Get the name of this service provider.

Returns:
name of this service provider

getNatures

java.util.Set<java.lang.String> getNatures()
Get the set of natures that this service applies to. The default nature "all" means the services is generic an applies to all natures.

Returns:
set of natures

getPriority

java.lang.Integer getPriority()
Get the priority of this service. Lower values have higher priority.

Returns:
a string representing the service priority

getProviderDescriptor

IServiceProviderDescriptor getProviderDescriptor(java.lang.String id)
Gets a specific provider of this service.

Parameters:
id - The unique ID of the service requested.
Returns:
IServiceProviderDescriptor

getProviders

java.util.Set<IServiceProviderDescriptor> getProviders()
Get the set of all providers for this service.

Returns:
set of providers for this service

getProvidersByPriority

java.util.SortedSet<IServiceProviderDescriptor> getProvidersByPriority()
Return the set of providers sorted by priority

Parameters:
service - service containing providers
Returns:
sorted providers

removeServiceProvider

void removeServiceProvider(IServiceProviderDescriptor provider)
Remove service provider from list of providers for this service.

Parameters:
provider - provider to remove

getCategory

IServiceCategory getCategory()
Returns the service category that contains this service or null if the service is not associated with a category.


getNullProvider

IServiceProvider getNullProvider()
Returns the special null "no-op" service provider, or null if there is none.


PTP
Release 5.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.