public final class InvokeMode
extends java.lang.Enum
Title: Open Service Framework
Description: Enumerated types of invoke modes for a Service.
This enumerated list presents modes for invoking a Service. A Service may be invoked in several ways depending on the desired event processing and acknowledgement mechanism. A service's event handlers are implemented as event consumers of the corresponding dispatcher. The invoke mode values are as follows:
ASYNC Invokes the given Event Handler
and returns immediately. The actual event object is queued
up for execution and handled by the Service in an asynchronous but serial fashion. This mode
guarantees that events are processed in the order in which they are received. In most cases this mode
results in better throughput at the expense of introducing some latency into Service execution. This mode
also makes the assumption that a Service is processing volatile events, wherein message loss is acceptable.
In situations where a Service Hosting Container
experiences a failure all enqueued events are lost.
A transport such as a Fabric Communications Protocol
may protect against such situations by introducing
other transmission control mechanisms such as Sequenced Message Exchange
coupled with delivery
guarantee mechanisms such as Asynchronous Acknowledgement
, thereby enforcing re-transmission of
unprocessed events. Asynchronous Service invocation may be used in conjunction with external flow control
mechanisms. However the invoke mechanisms offered by the framework function independent of any communication protocol.
DIRECT Invokes the given Event Handler
and blocks waiting for the underlying method to return. Events are
processed synchronously in the order they are received. This mode results in direct dispatch which has
minimal latency. When a Service's event dispatcher calls the FabricEventListener.onEvent(ImmutableEventDatagram)
it waits
on the method to complete. This has the effect of pushing back on the event producer, but it also ensures that exactly
one event is in process during any given failure. Synchronous execution may be combined with synchronous communication
protocols for improved Quality of Service
.
Copyright: Copyright (c) 2008
Company: StreamScape Technologies
Modifier and Type | Field and Description |
---|---|
static InvokeMode |
ASYNC |
static InvokeMode |
DIRECT |
Modifier and Type | Method and Description |
---|---|
static InvokeMode |
valueOf(java.lang.String name) |
static InvokeMode[] |
values() |
public static final InvokeMode ASYNC
public static final InvokeMode DIRECT
public static InvokeMode[] values()
public static InvokeMode valueOf(java.lang.String name)
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.