Package jadex.bridge.service.component
Interface IProvidedServicesFeature
-
- All Superinterfaces:
IExternalProvidedServicesFeature
- All Known Subinterfaces:
IBDIAgent
,IInternalAccess
- All Known Implementing Classes:
ComponentPlanBDI
,HelloWorldBDI
,HelloWorldPlan2
,IndexChangeBDI
,InterfaceInjectionBDI
,PlanMethodInjectionBDI
,PlanReasonInjectionBDI
,ProvidedServicesComponentFeature
,SayHelloBDI
public interface IProvidedServicesFeature extends IExternalProvidedServicesFeature
Component feature for provided services.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addInterceptor(IServiceInvocationInterceptor interceptor, java.lang.Object service, int pos)
Add a service interceptor.void
addMethodInvocationListener(IServiceIdentifier sid, MethodInfo mi, IMethodInvocationListener listener)
Add a method invocation handler.IServiceInvocationInterceptor[]
getInterceptors(java.lang.Object service)
Get the interceptors of a service.<T> T
getProvidedService(IServiceIdentifier sid)
Get the provided service implementation object by id.<T> T
getProvidedService(java.lang.Class<T> clazz)
Get provided (declared) service.IService
getProvidedService(java.lang.String name)
Get provided (declared) service.java.lang.Object
getProvidedServiceRawImpl(IServiceIdentifier sid)
Get the provided service implementation object by name.<T> T
getProvidedServiceRawImpl(java.lang.Class<T> clazz)
Get the provided service implementation object by class.java.lang.Object
getProvidedServiceRawImpl(java.lang.String name)
Get the provided service implementation object by name.<T> T[]
getProvidedServices(java.lang.Class<T> clazz)
Get provided (declared) service.boolean
hasMethodListeners(IServiceIdentifier sid, MethodInfo mi)
Test if service and method has listeners.void
notifyMethodListeners(IServiceIdentifier sid, boolean start, java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object callid, ServiceInvocationContext context)
Notify listeners that a service method has been called.void
removeInterceptor(IServiceInvocationInterceptor interceptor, java.lang.Object service)
Remove a service interceptor.void
removeMethodInvocationListener(IServiceIdentifier sid, MethodInfo mi, IMethodInvocationListener listener)
Remove a method invocation handler.-
Methods inherited from interface jadex.bridge.service.component.IExternalProvidedServicesFeature
addService, addService, addService, removeService, setTags
-
-
-
-
Method Detail
-
getProvidedService
IService getProvidedService(java.lang.String name)
Get provided (declared) service.- Parameters:
name
- The service name.- Returns:
- The service.
-
getProvidedService
<T> T getProvidedService(java.lang.Class<T> clazz)
Get provided (declared) service.- Parameters:
clazz
- The interface.- Returns:
- The service.
-
getProvidedService
<T> T getProvidedService(IServiceIdentifier sid)
Get the provided service implementation object by id.- Parameters:
name
- The service identifier.- Returns:
- The service.
-
getProvidedServices
<T> T[] getProvidedServices(java.lang.Class<T> clazz)
Get provided (declared) service.- Parameters:
clazz
- The interface (null for all services).- Returns:
- The service.
-
getProvidedServiceRawImpl
<T> T getProvidedServiceRawImpl(java.lang.Class<T> clazz)
Get the provided service implementation object by class.- Parameters:
clazz
- The service clazz.- Returns:
- The service.
-
getProvidedServiceRawImpl
java.lang.Object getProvidedServiceRawImpl(java.lang.String name)
Get the provided service implementation object by name.- Parameters:
name
- The service name.- Returns:
- The service.
-
getProvidedServiceRawImpl
java.lang.Object getProvidedServiceRawImpl(IServiceIdentifier sid)
Get the provided service implementation object by name.- Parameters:
name
- The service identifier.- Returns:
- The service.
-
addMethodInvocationListener
void addMethodInvocationListener(IServiceIdentifier sid, MethodInfo mi, IMethodInvocationListener listener)
Add a method invocation handler.- Parameters:
sid
- The service identifier.mi
- The method info.listener
- The method listener.
-
removeMethodInvocationListener
void removeMethodInvocationListener(IServiceIdentifier sid, MethodInfo mi, IMethodInvocationListener listener)
Remove a method invocation handler.- Parameters:
sid
- The service identifier.mi
- The method info.listener
- The method listener.
-
hasMethodListeners
boolean hasMethodListeners(IServiceIdentifier sid, MethodInfo mi)
Test if service and method has listeners.- Parameters:
sid
- The service identifier.mi
- The method info.
-
notifyMethodListeners
void notifyMethodListeners(IServiceIdentifier sid, boolean start, java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object callid, ServiceInvocationContext context)
Notify listeners that a service method has been called.
-
addInterceptor
void addInterceptor(IServiceInvocationInterceptor interceptor, java.lang.Object service, int pos)
Add a service interceptor.- Parameters:
interceptor
- The interceptor.service
- The service.pos
- The position (0=first, -1=last-1, i.e. one before method invocation).
-
removeInterceptor
void removeInterceptor(IServiceInvocationInterceptor interceptor, java.lang.Object service)
Remove a service interceptor.- Parameters:
interceptor
- The interceptor.service
- The service.
-
getInterceptors
IServiceInvocationInterceptor[] getInterceptors(java.lang.Object service)
Get the interceptors of a service.- Parameters:
service
- The service.- Returns:
- The interceptors.
-
-