Package org.nuclos.api.provider
Class CommunicationProvider
java.lang.Object
org.nuclos.api.provider.CommunicationProvider
CommunicationProvider
provides methods for communication with ports
This Class is usually used in Rule-classes and allows API access only
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
executeRequest
(RequestContext<?> context) static void
handleNotification
(NotificationContext context) static void
handleResponse
(RequestContext<?> context) static <T extends InstantiableContext>
TnewContextInstance
(CommunicationPortKey portKey, Class<T> contextClass) For use in rules.static <T extends InstantiableContext>
TnewContextInstance
(CommunicationPort port, Class<T> contextClass) For internal use in ports.void
setCommunicationService
(CommunicationService comService)
-
Constructor Details
-
CommunicationProvider
CommunicationProvider()
-
-
Method Details
-
setCommunicationService
-
handleNotification
- Parameters:
context
-- Throws:
BusinessException
-
executeRequest
- Parameters:
context
-- Throws:
BusinessException
-
handleResponse
- Parameters:
context
-- Throws:
BusinessException
-
newContextInstance
public static <T extends InstantiableContext> T newContextInstance(CommunicationPortKey portKey, Class<T> contextClass) throws BusinessException For use in rules.- Parameters:
portKey
-contextClass
-- Returns:
- a new instance of the given context class
- Throws:
BusinessException
-
newContextInstance
public static <T extends InstantiableContext> T newContextInstance(CommunicationPort port, Class<T> contextClass) throws BusinessException For internal use in ports.- Parameters:
port
-contextClass
-- Returns:
- a new instance of the given context class
- Throws:
BusinessException
-