public class SAMService extends BaseService
Service.Slice| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
POLLING_PERIOD |
static int |
POLLING_PERIOD_DEFAULT |
static java.lang.String |
SAM_INFO_HANDLERS |
static java.lang.String |
SAM_INFO_HANDLERS_DEFAULT |
ALL_DUMP_KEY, MAIN_SLICE, myFinder, myLogger, THIS_SLICEADOPTED_NODE, DEAD_NODE, DEAD_PLATFORM_MANAGER, DEAD_REPLICA, DEAD_SLICE, NEW_NODE, NEW_REPLICA, NEW_SLICE, REATTACHED, RECONNECTED| Constructor and Description |
|---|
SAMService() |
| Modifier and Type | Method and Description |
|---|---|
void |
boot(Profile p)
Performs the active initialization step of a kernel-level
service.
|
Filter |
getCommandFilter(boolean direction)
This should be properly implemented
by the services that have filters.
|
ServiceHelper |
getHelper(Agent a)
This should be properly implemented
by the services that have helpers.
|
java.lang.Class |
getHorizontalInterface()
This should be properly implemented
by the services that have non-empty slices.
|
Service.Slice |
getLocalSlice()
This should be properly implemented
by the services that have non-empty slices.
|
java.lang.String |
getName()
Retrieve the name of this service, that can be used to look up
its slices in the Service Finder.
|
static SAMHelper |
getSingletonHelper() |
void |
init(AgentContainer ac,
Profile p)
Performs the passive initialization step of the service.
|
void |
shutdown()
Performs the shutdown step of a kernel-level service.
|
addAlias, broadcast, clearCachedSlice, createInvokator, dump, getAllSlices, getAMSBehaviour, getCommandSink, getFreshSlice, getIMTPManager, getLocalNode, getNumberOfSlices, getOwnedCommands, getSlice, isLocal, lookupAlias, stringifySlice, submitpublic static final java.lang.String POLLING_PERIOD
public static final int POLLING_PERIOD_DEFAULT
public static final java.lang.String SAM_INFO_HANDLERS
public static final java.lang.String SAM_INFO_HANDLERS_DEFAULT
public java.lang.String getName()
ServiceServiceFinderpublic void init(AgentContainer ac, Profile p) throws ProfileException
Serviceboot() method.init in interface Serviceinit in class BaseServiceac - The agent container this service is activated on.p - The configuration profile for this service.ProfileException - If the given profile is not valid.public void boot(Profile p) throws ServiceException
Serviceboot in interface Serviceboot in class BaseServicep - The configuration profile for this service.ServiceException - If a problem occurs during service
initialization.public void shutdown()
Serviceshutdown in interface Serviceshutdown in class BaseServicepublic Filter getCommandFilter(boolean direction)
BaseServicedirection
parameter this method MUST always return the same object!getCommandFilter in interface ServicegetCommandFilter in class BaseServicedirection - One of the two constants
Filter.INCOMING and Filter.OUTGOING,
distinguishing between the two filter chains managed by the
command processor.Filter object, used by this service to
intercept and process kernel-level commands. If the service
does not wish to install a command filter for one or both
directions, it can just return null when
appropriate.jade.core.CommandProcessorpublic ServiceHelper getHelper(Agent a)
BaseServicegetHelper in interface ServicegetHelper in class BaseServicea - The agent which the helper is requested for.AgentToolkit.getHelper(jade.core.Agent, java.lang.String),
Agent.getHelper(java.lang.String)public static SAMHelper getSingletonHelper()
public java.lang.Class getHorizontalInterface()
BaseServicegetHorizontalInterface in interface ServicegetHorizontalInterface in class BaseServiceClass object, representing the interface
that is implemented by the slices of this service. Let
s be the Class object corresponding
to the Service.Slice interface, and let
c be the returned Class object. Then,
the two following conditions must hold:
c.isInterface() == trues.isAssignableFrom(c) == truepublic Service.Slice getLocalSlice()
BaseServicegetLocalSlice in interface ServicegetLocalSlice in class BaseServicenull if no such slice exists.