public interface ServerTransaction extends ServerTransaction, Transaction
ServerTransaction
interface.This version has the "stateful" flag, which defines whether the server transaction behaves statefully (no request retransmits are seen by the application) or statelessly (all request retransmits are seen by the application). The stack always creates a server transaction for new requests, but if the app instructs the server transaction to behave statelessly then it will be able to process every request retransmission as if it were a stateless proxy.
Typically an app that wishes to behave statelessly would use this as follows:
public void processRequest(RequestEvent event) { ServerTransaction txn = event.getServerTransaction(); // Set stateless flag first time we see the transaction if (txn.isStateful()) txn.setStateful(false); // process request statelessly ... }Because the stateful flag is per-transaction, stateful and stateless apps can run using the same stack instance, eg. in a container.
This version supports the per-transaction retransmission filter flag for INVITE
transactions.
Note if the stateful flag is disabled, then the INVITE transaction retransmission
filter (See Transaction.setRetransmissionFilter(boolean)
is automatically disabled.
By default, server transactions are stateful, as this is the most common usage.
Modifier and Type | Method and Description |
---|---|
boolean |
isStateful()
Get the value of the retransmission filter.
|
void |
setStateful(boolean enabled)
Set the stateful/stateless behaviour of this transaction.
|
enableRetransmissionAlerts, sendResponse
getApplicationData, getBranchId, getDialog, getRequest, getRetransmitTimer, getState, setApplicationData, setRetransmitTimer, terminate
getLocalEndpoint, getPeerCertificates, isRetransmissionFilterEnabled, setRetransmissionFilter
void setStateful(boolean enabled)
enabled
- if true
, stateful behaviour is enabled (the default). If
false
, the transaction behaves statelessly, ie. the application must handle
all retransmissions.boolean isStateful()
true
if enabled, false
otherwise.