Package com.opencloud.javax.sip
Interface Transaction
-
- All Known Subinterfaces:
ClientTransaction
,ServerTransaction
public interface Transaction
Base Transaction extension interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Endpoint
getLocalEndpoint()
Get the local endpoint that the transaction was created on.Certificate[]
getPeerCertificates()
Get the peer certificate chain for the peer that the transaction is connected to.boolean
isRetransmissionFilterEnabled()
Get the value of the retransmission filter.void
setRetransmissionFilter(boolean enabled)
Sets the retransmission behaviour of this transaction.
-
-
-
Method Detail
-
setRetransmissionFilter
void setRetransmissionFilter(boolean enabled)
Sets the retransmission behaviour of this transaction. This only affects INVITE transactions. If the retransmission filter is enabled, the transaction's retransmit behaviour is as follows:- Client Transactions: The INVITE request is automatically retransmitted by the stack. When the UAC receives a 2xx response and sends an ACK, the ACK is automatically retransmitted by the stack if any more 2xx response retransmits are received.
- Server Transactions: The final 2xx response to an INVITE is automatically retransmitted until an ACK is received.
If not enabled, the behaviour is as follows:
- Client Transactions: After sending the initial INVITE, the UAC will receive retransmit timeout events from the stack. The UAS is responsible for re-sending the INVITE request. 2xx responses are passed statelessly to the UAC, and the UAC must send an ACK request for every response.
- Server Transactions: The UAS is responsible for retransmitting the 2xx response until an ACK is received.
Retransmits for non-INVITE transactions are handled entirely by the transaction, ie. the application will never see retransmissions.
Note that according to RFC3261, the INVITE client transaction terminates when the first 2xx response is received, so subsequent ResponseEvents with 2xx responses to this client transaction will have
null
client transaction values.- Parameters:
enabled
- set totrue
to enable retransmission filter,false
to disable.
-
isRetransmissionFilterEnabled
boolean isRetransmissionFilterEnabled()
Get the value of the retransmission filter.- Returns:
true
if enabled,false
otherwise.
-
getLocalEndpoint
Endpoint getLocalEndpoint()
Get the local endpoint that the transaction was created on. For server transactions this is the endpoint where the initial request was received. For client transactions this is the endpoint where the initial request was sent from.- Returns:
- the endpoint that this transaction was created on.
-
getPeerCertificates
Certificate[] getPeerCertificates() throws IOException, SSLPeerUnverifiedException, UnsupportedOperationException
Get the peer certificate chain for the peer that the transaction is connected to.- Returns:
- the peer certificates, starting with the client's certificate, then CAs.
- Throws:
UnsupportedOperationException
- if this was called on a non-SSL connectionIOException
- if the connection is not connectedSSLPeerUnverifiedException
- if the SSL peer is not verified
-
-