public class BasicService extends Object implements IInternalService
EMPTY_SERVICES
Constructor and Description |
---|
BasicService(Object providerid,
Class type,
Map properties)
Create a new service.
|
Modifier and Type | Method and Description |
---|---|
static IServiceIdentifier |
createServiceIdentifier(Object providerid,
String servicename,
Class servicetype,
Class serviceimpl)
Create a new service identifier.
|
void |
createServiceIdentifier(String name,
Class implclazz)
Set the service identifier.
|
boolean |
equals(Object obj)
Check if the service is equal.
|
static String |
generateServiceName(Class service)
Generate a unique name.
|
Map |
getPropertyMap()
Get a service property.
|
IServiceIdentifier |
getServiceIdentifier()
Get the service id.
|
IFuture<Boolean> |
isValid()
Test if the service is valid.
|
void |
setPropertyMap(Map properties)
Set the properties.
|
IFuture<Void> |
shutdownService()
Shutdown the service.
|
IFuture<Void> |
startService()
Start the service.
|
public void createServiceIdentifier(String name, Class implclazz)
createServiceIdentifier
in interface IInternalService
public IServiceIdentifier getServiceIdentifier()
getServiceIdentifier
in interface IService
public Map getPropertyMap()
getPropertyMap
in interface IService
public void setPropertyMap(Map properties)
properties
- The properties to set.public IFuture<Void> startService()
startService
in interface IInternalService
public IFuture<Void> shutdownService()
shutdownService
in interface IInternalService
public static String generateServiceName(Class service)
The
- calling service class.public static IServiceIdentifier createServiceIdentifier(Object providerid, String servicename, Class servicetype, Class serviceimpl)
providerid
- The provider id.servicename
- The service name.Copyright © 2012. All Rights Reserved.