public interface ServiceAccessor extends FabricComponentAccessor
Title: Service Event Fabric Core
Description: Defines an accessor to a service.
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEventHandlerParameterName(java.lang.String handlerName) |
RPLMethodsCache.RPLMethodInfo |
getEventHandlerRPLMethodInfo(java.lang.String handlerName) |
java.util.List |
getEventHandlers()
Returns a list of all event handlers in the accessed service.
|
void |
invokeAsyncServiceRequest(ImmutableEventDatagram request)
Sends the specified request asynchronously.
|
ImmutableEventDatagram |
invokeServiceRequest(EventDatagram request,
RequestDistributionStrategy strategy)
Performs the
invokeServiceRequest(com.streamscape.sdo.EventDatagram, com.streamscape.sdo.enums.RequestDistributionStrategy, long)
with a timeout previously set by the FabricComponentAccessor.setRequestTimeout(long) method or default timeout (30 seconds). |
ImmutableEventDatagram |
invokeServiceRequest(EventDatagram request,
RequestDistributionStrategy strategy,
long timeout)
Sends the specified request and waits until a response will be received or waiting period will expire.
|
ImmutableEventDatagram |
invokeServiceRequest(ImmutableEventDatagram request)
Performs the
invokeServiceRequest(ImmutableEventDatagram, long) with a timeout
previously set by the FabricComponentAccessor.setRequestTimeout(long) method or default timeout (30 seconds). |
ImmutableEventDatagram |
invokeServiceRequest(ImmutableEventDatagram request,
long timeout)
Sends the specified request and waits until a response will be received or waiting period will expire.
|
java.lang.Object |
invokeServiceRequest(java.lang.String eventHandler,
EIMObject eimData,
java.lang.Object data)
Performs the
invokeServiceRequest(String, EIMObject, Object, long) with a timeout
previously set by the FabricComponentAccessor.setRequestTimeout(long) method or default timeout (30 seconds). |
java.lang.Object |
invokeServiceRequest(java.lang.String eventHandler,
EIMObject eimData,
java.lang.Object data,
long timeout)
Invokes the specified event handler and waits until a response will be received or waiting period will expire.
|
java.lang.Object |
invokeServiceRequest(java.lang.String eventHandler,
java.lang.Object data)
Performs the
invokeServiceRequest(String, Object, long) with a timeout
previously set by the FabricComponentAccessor.setRequestTimeout(long) method or default timeout (30 seconds). |
java.lang.Object |
invokeServiceRequest(java.lang.String eventHandler,
java.lang.Object data,
long timeout)
Invokes the specified event handler and waits until a response will be received or waiting period will expire.
|
java.lang.Object |
invokeServiceRequest(java.lang.String eventHandler,
java.lang.Object data,
java.util.Map properties,
long timeout)
Performs the
invokeServiceRequest(String, Object, long) with adding properties for event handler |
boolean |
isEventHandlerValid(java.lang.String handlerName)
Checks if the specified event handler is valid.
|
java.util.List |
listActiveEvents()
Returns a list of all active events in service.
|
java.util.List |
listEventHandlers()
Returns a list of names of all event handlers in the accessed service.
|
EventHandler |
lookupEventHandler(java.lang.String handlerName)
Finds and returns an event handler with the specified name.
|
EventHandler |
lookupEventHandlerByMethod(java.lang.String methodName)
Finds and returns an event handler corresponding to the specified method of the accessed service.
|
autoSwitching, close, getAccessorName, getActualNodeName, getComponentModel, getComponentName, getComponentType, getEventScope, getName, getNodeName, getRequestTimeout, getSession, invokeCompleteRequest, invokeCompleteRequest, invokeInterruptRequest, invokeLanguageRequest, invokeLanguageRequest, invokeLanguageRequest, invokeLanguageRequest, isAvailable, isOpened, resync, setAutoSwitching, setRequestTimeout, setStateListener, setStateListener, switchComponent
hasSinkEvents, listSinkEvents
existsActionableEvent, hasActionableEvents, listActionableEvents
addEventTrigger, alterEventTrigger, compileEventTrigger, disableEventTrigger, enableEventTrigger, getEventTriggerDefinition, getEventTriggerDefinitions, getEventTriggerSyntax, getLastError, getTriggerActionTime, getTriggerState, isEventTriggerAutoEnable, removeAllEventTriggers, removeEventTrigger, setEventTriggerAutoEnable
existsEventTrigger, getEventTriggerData, hasEventTriggers, listEventTriggers
ImmutableEventDatagram invokeServiceRequest(ImmutableEventDatagram request) throws FabricComponentAccessorException, FabricEventSourceException, ServiceFrameworkException
invokeServiceRequest(ImmutableEventDatagram, long)
with a timeout
previously set by the FabricComponentAccessor.setRequestTimeout(long)
method or default timeout (30 seconds).request
- the request to be sent.FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available or
if some other error occurs.FabricEventSourceException
- if some error occurs in the Exchange.ServiceFrameworkException
- if some error occurs during processing of the request in the event handler.ImmutableEventDatagram invokeServiceRequest(ImmutableEventDatagram request, long timeout) throws FabricComponentAccessorException, FabricEventSourceException, ServiceFrameworkException
This method does not ignore an event selector that can be set for the specified event handler.
request
- the request to be sent.timeout
- the waiting time for a response (in milliseconds).FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available.FabricEventSourceException
- if some error occurs in the Exchange.ServiceFrameworkException
- if some error occurs during processing of the request in the event handler.java.lang.Object invokeServiceRequest(java.lang.String eventHandler, java.lang.Object data) throws FabricComponentAccessorException, ServiceFrameworkException
invokeServiceRequest(String, Object, long)
with a timeout
previously set by the FabricComponentAccessor.setRequestTimeout(long)
method or default timeout (30 seconds).eventHandler
- the name of the event to be invoked.data
- the data object to be passed to event handler.FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available or
if some other error occurs in the Exchange.ServiceFrameworkException
- if some error occurs during processing of the request in the event handler.java.lang.Object invokeServiceRequest(java.lang.String eventHandler, java.lang.Object data, long timeout) throws FabricComponentAccessorException, ServiceFrameworkException
This method ignores an event selector that can be set for the specified event handler.
eventHandler
- the name of the event handler to be invoked.data
- the data object to be passed to event handler.timeout
- the waiting time for a response (in milliseconds).FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available or
if some other error occurs in the Exchange.ServiceFrameworkException
- if some error occurs during processing of the request in the event handler.java.lang.Object invokeServiceRequest(java.lang.String eventHandler, java.lang.Object data, java.util.Map properties, long timeout) throws FabricComponentAccessorException, ServiceFrameworkException
invokeServiceRequest(String, Object, long)
with adding properties for event handlereventHandler
- the name of the event handler to be invoked.data
- the data object to be passed to event handler.properties
- the map of properties to be passed to event handler.timeout
- the waiting time for a response (in milliseconds).FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available or
if some other error occurs in the Exchange.ServiceFrameworkException
- if some error occurs during processing of the request in the event handler.java.lang.Object invokeServiceRequest(java.lang.String eventHandler, EIMObject eimData, java.lang.Object data) throws FabricComponentAccessorException, ServiceFrameworkException
invokeServiceRequest(String, EIMObject, Object, long)
with a timeout
previously set by the FabricComponentAccessor.setRequestTimeout(long)
method or default timeout (30 seconds).eventHandler
- the name of the event handler to be invoked.eimData
- the EIM data of the event associated with the specified handler.data
- the data object to be passed to event handler.FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available or
if some other error occurs in the Exchange.ServiceFrameworkException
- if some error occurs during processing of the request in the event handler.java.lang.Object invokeServiceRequest(java.lang.String eventHandler, EIMObject eimData, java.lang.Object data, long timeout) throws FabricComponentAccessorException, ServiceFrameworkException
This method ignores an event selector that can be set for the specified event handler.
eventHandler
- the name of the event handler to be invoked.eimData
- the EIM data of the event associated with the specified handler.data
- the data object to be passed to event handler.timeout
- the waiting time for a response (in milliseconds).FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available or
if some other error occurs in the Exchange.ServiceFrameworkException
- if some error occurs during processing of the request in the event handler.ImmutableEventDatagram invokeServiceRequest(EventDatagram request, RequestDistributionStrategy strategy) throws FabricComponentAccessorException, FabricEventSourceException, ServiceFrameworkException
invokeServiceRequest(com.streamscape.sdo.EventDatagram, com.streamscape.sdo.enums.RequestDistributionStrategy, long)
with a timeout previously set by the FabricComponentAccessor.setRequestTimeout(long)
method or default timeout (30 seconds).request
- the request to be sent.strategy
- the strategy used for a distribution of the request.FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available or
if some other error occurs.FabricEventSourceException
- if some error occurs in the Exchange.ServiceFrameworkException
- if some error occurs during processing of the request in the event handler.ImmutableEventDatagram invokeServiceRequest(EventDatagram request, RequestDistributionStrategy strategy, long timeout) throws FabricComponentAccessorException, FabricEventSourceException, ServiceFrameworkException
GLOBAL
, the request is sent to all suitable services
(i.e. services with suitable type and name in all Fabric nodes) and the first acknowledgement received by the accessor
is returned as the response.
replyTo
field in the request manually, the accessed service will not
send an automatic acknowledgement on this request. In this case an acknowledgement should be sent by the corresponding event handler
or event trigger manually by the user.
Only AUCTION
distribution strategy is supported at present.
request
- the request to be sent.strategy
- the strategy used for a distribution of the request.timeout
- the waiting time for a response (in milliseconds).FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available.FabricEventSourceException
- if some error occurs in the Exchange.ServiceFrameworkException
- if some error occurs during processing of the request in the event handler.void invokeAsyncServiceRequest(ImmutableEventDatagram request) throws FabricComponentAccessorException, FabricEventSourceException
GLOBAl
, the request is sent to all suitable services
(i.e. services with suitable type and name in all Fabric nodes).request
- the request to be sent.FabricComponentAccessorException
- if the accessor is closed or
if the accessed service is not available.FabricEventSourceException
- if some error occurs in the Exchange.EventHandler lookupEventHandler(java.lang.String handlerName) throws FabricComponentAccessorException
handlerName
- the name of the event handler to be searched.null
if such event handler does not exist in the accessed service.FabricComponentAccessorException
- if the accessed service is not available or
if some other error occurs in the Exchange.EventHandler lookupEventHandlerByMethod(java.lang.String methodName) throws FabricComponentAccessorException
methodName
- the name of the handler's method.null
if such event handler does not exist in the accessed service.FabricComponentAccessorException
- if the accessed service is not available or
if some other error occurs in the Exchange.boolean isEventHandlerValid(java.lang.String handlerName) throws FabricComponentAccessorException
handlerName
- the name of the event handler to be checked.true
if the specified event handler is valid, false
otherwise.FabricComponentAccessorException
- if the accessed service is not available or
if the specified event handler does not exist or
if some other error occurs in the Exchange.java.util.List getEventHandlers() throws FabricComponentAccessorException
FabricComponentAccessorException
- if the accessed service is not available or
if some other error occurs in the Exchange.java.util.List listEventHandlers() throws FabricComponentAccessorException
FabricComponentAccessorException
- if the accessed service is not available or
if some other error occurs in the Exchange.java.util.List listActiveEvents() throws FabricComponentAccessorException
FabricComponentAccessorException
- if the accessed service is not available or
if some other error occurs in the Exchange.java.lang.String getEventHandlerParameterName(java.lang.String handlerName) throws FabricComponentAccessorException
FabricComponentAccessorException
RPLMethodsCache.RPLMethodInfo getEventHandlerRPLMethodInfo(java.lang.String handlerName) throws FabricComponentAccessorException
FabricComponentAccessorException
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.