public interface SIPServerTransaction extends SIPTransaction, ServerTransaction, ServerTransactionExt, ServerRequestInterface
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_SUBTYPE_SDP |
static String |
CONTENT_TYPE_APPLICATION |
CALLING_STATE, COMPLETED_STATE, CONFIRMED_STATE, INITIAL_STATE, PROCEEDING_STATE, T1, TERMINATED_STATE, TIMER_A, TIMER_B, TIMER_F, TIMER_H, TIMER_J, TRYING_STATE| Modifier and Type | Method and Description |
|---|---|
boolean |
ackSeen()
This is book-keeping for retransmission filter management.
|
void |
cleanUp() |
void |
disableRetransmissionAlerts()
Disable retransmission Alerts and cancel associated timers.
|
void |
enableRetransmissionAlerts()
Enable the timeout retransmit notifications for the ServerTransaction.
|
boolean |
equals(Object other) |
SIPServerTransaction |
getCanceledInviteTransaction()
TODO -- this method has to be added to the api.
|
Dialog |
getDialog()
Gets the dialog object of this Transaction object.
|
int |
getLastResponseStatusCode()
Get the last response status code.
|
long |
getPendingReliableCSeqNumber() |
String |
getPendingReliableResponseMethod() |
long |
getPendingReliableRSeqNumber() |
byte[] |
getReliableProvisionalResponse() |
MessageChannel |
getResponseChannel()
Returns this transaction.
|
TransactionState |
getState()
Return the current transaction state according to the RFC 3261 transaction state machine.
|
String |
getViaHost()
Get the host to assign for an outgoing Request via header.
|
int |
getViaPort()
Get the port to assign for the via header of an outgoing message.
|
boolean |
isMessagePartOfTransaction(SIPMessage messageToTest)
Determines if the message is a part of this transaction.
|
boolean |
isRetransmissionAlertEnabled() |
boolean |
isTransactionMapped()
Return true if the transaction is known to stack.
|
void |
map()
Send out a trying response (only happens when the transaction is mapped).
|
boolean |
prackRecieved()
Cancel the retransmit timer for the provisional response task.
|
void |
processRequest(SIPRequest transactionRequest,
MessageChannel sourceChannel)
Process a new request message through this transaction.
|
void |
releaseSem()
Release the transaction semaphore.
|
void |
resendLastResponseAsBytes() |
void |
scheduleAckRemoval() |
void |
sendMessage(SIPMessage messageToSend)
Send a response message through this transaction and onto the client.
|
void |
sendReliableProvisionalResponse(Response relResponse) |
void |
sendResponse(Response response)
Sends the Response to a Request which is associated with this
ServerTransaction.
|
void |
setAckSeen()
This is book-keeping for retransmission filter management.
|
void |
setDialog(SIPDialog sipDialog,
String dialogId)
set the dialog object.
|
void |
setInviteTransaction(SIPServerTransaction st)
The INVITE Server Transaction corresponding to a CANCEL Server Transaction.
|
void |
setMapped(boolean b) |
void |
setOriginalRequest(SIPRequest originalRequest)
Set the original request.
|
void |
setPendingSubscribe(SIPClientTransaction pendingSubscribeClientTx) |
void |
setRequestInterface(ServerRequestInterface newRequestOf)
Sets the real RequestInterface this transaction encapsulates.
|
void |
setState(int newState)
Sets a timeout after which the connection is closed (provided the server does not use the
connection for outgoing requests in this time period) and calls the superclass to set
state.
|
void |
setTransactionMapped(boolean transactionMapped)
Set if the transaction is known to stack.
|
void |
terminate()
Terminate this transaction and immediately release all stack resources
associated with it.
|
void |
waitForTermination() |
acquireSem, addEventListener, cancelMaxTxLifeTimeTimer, close, disableRetransmissionTimer, disableTimeoutTimer, doesCancelMatchTransaction, extractCertIdentities, fireRetransmissionTimer, fireTimeoutTimer, fireTimer, getApplicationData, getAuditTag, getBaseTimerInterval, getBranch, getBranchId, getCipherSuite, getCSeq, getForkId, getHost, getInternalState, getKey, getLastResponse, getLocalCertificates, getMergeId, getMessageChannel, getMessageProcessor, getMethod, getOriginalRequest, getPeerAddress, getPeerCertificates, getPeerPacketSourceAddress, getPeerPacketSourcePort, getPeerPort, getPeerProtocol, getPort, getRequest, getResponse, getRetransmitTimer, getSipProvider, getSIPStack, getT2, getT4, getTimerD, getTimerI, getTimerK, getTimerT2, getTimerT4, getTransactionId, getTransport, getViaHeader, hashCode, isByeTransaction, isCancelTransaction, isDialogCreatingTransaction, isInviteTransaction, isReleaseReferences, isReliable, isSecure, isServerTransaction, isTerminated, passToListener, raiseErrorEvent, raiseIOExceptionEvent, removeEventListener, scheduleMaxTxLifeTimeTimer, semRelease, setApplicationData, setAuditTag, setBranch, setCollectionTime, setEncapsulatedChannel, setForkId, setPassToListener, setReleaseReferences, setRetransmitTimer, setTimerD, setTimerT2, setTimerT4, startTransactionTimer, testAndSetTransactionTerminatedEventstatic final String CONTENT_TYPE_APPLICATION
static final String CONTENT_SUBTYPE_SDP
void setRequestInterface(ServerRequestInterface newRequestOf)
newRequestOf - RequestInterface to send messages to.MessageChannel getResponseChannel()
boolean isMessagePartOfTransaction(SIPMessage messageToTest)
isMessagePartOfTransaction in interface SIPTransactionmessageToTest - Message to check if it is part of this transaction.boolean isTransactionMapped()
isTransactionMapped in interface SIPTransactionvoid setTransactionMapped(boolean transactionMapped)
setTransactionMapped in interface SIPTransactiontransactionMapped - void processRequest(SIPRequest transactionRequest, MessageChannel sourceChannel)
processRequest in interface ServerRequestInterfacetransactionRequest - Request to process.sourceChannel - Channel that received this message.void sendMessage(SIPMessage messageToSend) throws IOException
sendMessage in interface SIPTransactionmessageToSend - Response to process and send.IOExceptionString getViaHost()
SIPTransactiongetViaHost in interface SIPTransactionint getViaPort()
SIPTransactiongetViaPort in interface SIPTransactionvoid resendLastResponseAsBytes()
throws IOException
IOExceptionint getLastResponseStatusCode()
void setOriginalRequest(SIPRequest originalRequest)
setOriginalRequest in interface SIPTransactionoriginalRequest - Request being handled.void sendResponse(Response response) throws SipException
ServerTransactionMessageFactory and
then passes that Response to this method. The Response message gets sent out on
the network via the ListeningPoint information that is associated with
the SipProvider of this ServerTransaction.
This method implies that the application is functioning as either a UAS or a stateful proxy, hence the underlying implementation acts statefully. When a UAS sends a 2xx response to an INVITE, the server transaction is transitions to the TerminatedState. The implementation may delay physically removing ServerTransaction record from memory to catch retransmissions of the INVITE in accordance with the reccomendation of http://bugs.sipit.net/show_bug.cgi?id=769 .
ACK Processing and final response retransmission:
If a Dialog is associated
with the ServerTransaction then when the UAC sends the ACK ( the typical case for User Agents),
the Application ( i.e. Listener )
will see a ServerTransaction corresponding to the ACK and the corresponding
Dialog presented to it. The ACK will be presented to the Listener only
once in this case. Retransmissions of the OK and filtering of ACK retransmission
are the responsibility of the Dialog layer of this specification. However
if no Dialog is associated with the INVITE Transaction, the ACK will be presented
to the Application with a null Dialog in the RequestEvent and there will be
no Dialog associated with the ACK Transaction
(i.e. Transaction.getDialog() returns null).
In this case (when there is no Dialog associated with the original INVITE or ACK)
the Application is responsible for retransmission
of the OK for the INVITE if necessary (i.e. if it wants to manage its own dialog layer and
function as a User Agent) and for dealing with retransmissions of the ACK. This
requires that the three way handshake of an INVITE is managed by the UAS
application and not the implementation of this specification.
Note that Responses created via Dialog.createReliableProvisionalResponse(int)
should be sent using Dialog.sendReliableProvisionalResponse(Response)
sendResponse in interface ServerTransactionresponse - the Response to send to the Request.SipException - if the SipProvider cannot send the Response for any
other reason.ResponseTransactionState getState()
getState in interface SIPTransactiongetState in interface Transactionvoid setState(int newState)
setState in interface SIPTransactionnewState - New state of this transaction.Dialog getDialog()
SIPTransactiongetDialog in interface SIPTransactiongetDialog in interface TransactionDialogvoid setDialog(SIPDialog sipDialog, String dialogId)
SIPTransactionsetDialog in interface SIPTransactionsipDialog - --
the dialog to set.dialogId - --
the dialog id ot associate with the dialog.svoid terminate()
throws ObjectInUseException
Transactionterminate in interface TransactionObjectInUseException - if the transaction cannot be terminated as
it is associated to a dialog.byte[] getReliableProvisionalResponse()
boolean prackRecieved()
void enableRetransmissionAlerts()
throws SipException
ServerTransactionTimeout.RETRANSMIT
until the application calls Transaction.terminate() or a
the listener receives a SipListener.processTransactionTerminated(TransactionTerminatedEvent) callback.
Note that the stack calls
SipListener.processTransactionTerminated(TransactionTerminatedEvent)asynchronously
after it removes the transaction some time after the Transaction state is set to
TransactionState.TERMINATED ;
after which, it maintains no record of the Transaction.enableRetransmissionAlerts in interface ServerTransactionSipException - if a Dialog is already associated with the ServerTransaction
when the method is called.boolean isRetransmissionAlertEnabled()
void disableRetransmissionAlerts()
void setAckSeen()
boolean ackSeen()
void setMapped(boolean b)
void setPendingSubscribe(SIPClientTransaction pendingSubscribeClientTx)
void releaseSem()
SIPTransactionreleaseSem in interface SIPTransactionvoid setInviteTransaction(SIPServerTransaction st)
st - -- the invite server tx corresponding to the cancel server transaction.SIPServerTransaction getCanceledInviteTransaction()
getCanceledInviteTransaction in interface ServerTransactionExtvoid scheduleAckRemoval()
throws IllegalStateException
IllegalStateExceptionvoid cleanUp()
cleanUp in interface SIPTransactionString getPendingReliableResponseMethod()
long getPendingReliableCSeqNumber()
long getPendingReliableRSeqNumber()
void waitForTermination()
void sendReliableProvisionalResponse(Response relResponse) throws SipException
SipExceptionvoid map()
Copyright © 2014. All Rights Reserved.