Class PService
- java.lang.Object
-
- net.morimekta.providence.descriptor.PService
-
public abstract class PService extends java.lang.Object
Descriptor for a complete service.
-
-
Constructor Summary
Constructors Constructor Description PService(java.lang.String programName, java.lang.String name, PServiceProvider extendsService, java.util.Collection<? extends PServiceMethod> methods)
PService(java.lang.String programName, java.lang.String name, PServiceProvider extendsService, PServiceMethod[] methods)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PService
getExtendsService()
Get the service that this service extends.abstract PServiceMethod
getMethod(java.lang.String name)
Get the method definition for the given method name.java.util.Collection<? extends PServiceMethod>
getMethods()
Get the collection of methods for the service, including all inherited services.java.lang.String
getName()
java.lang.String
getProgramName()
java.lang.String
getQualifiedName()
java.lang.String
getQualifiedName(java.lang.String programContext)
-
-
-
Constructor Detail
-
PService
public PService(@Nonnull java.lang.String programName, @Nonnull java.lang.String name, @Nullable PServiceProvider extendsService, @Nonnull java.util.Collection<? extends PServiceMethod> methods)
-
PService
public PService(@Nonnull java.lang.String programName, @Nonnull java.lang.String name, @Nullable PServiceProvider extendsService, @Nonnull PServiceMethod[] methods)
-
-
Method Detail
-
getProgramName
@Nonnull public java.lang.String getProgramName()
- Returns:
- Get the program name for the service.
-
getName
@Nonnull public java.lang.String getName()
- Returns:
- Get the name of the service.
-
getQualifiedName
@Nonnull public java.lang.String getQualifiedName(java.lang.String programContext)
- Parameters:
programContext
- The relative program context.- Returns:
- Get the qualified name or relative name given the current program context.
-
getQualifiedName
@Nonnull public java.lang.String getQualifiedName()
- Returns:
- Get the qualified name for the service.
-
getExtendsService
@Nullable public PService getExtendsService()
Get the service that this service extends.- Returns:
- Extended service or null if none.
-
getMethods
@Nonnull public java.util.Collection<? extends PServiceMethod> getMethods()
Get the collection of methods for the service, including all inherited services.- Returns:
- The collection of methods.
-
getMethod
@Nullable public abstract PServiceMethod getMethod(java.lang.String name)
Get the method definition for the given method name.- Parameters:
name
- The service method name.- Returns:
- The service method.
-
-