public interface SIPTransaction extends TransactionExt
Modifier and Type | Field and Description |
---|---|
static TransactionState |
CALLING_STATE
CALLING State.
|
static TransactionState |
COMPLETED_STATE
Completed state.
|
static TransactionState |
CONFIRMED_STATE
Confirmed state.
|
static TransactionState |
INITIAL_STATE
Initialized but no state assigned.
|
static TransactionState |
PROCEEDING_STATE
Proceeding state.
|
static int |
T1
One timer tick.
|
static TransactionState |
TERMINATED_STATE
Terminated state.
|
static int |
TIMER_A
INVITE request retransmit interval, for UDP only
|
static int |
TIMER_B
INVITE transaction timeout timer
|
static int |
TIMER_F |
static int |
TIMER_H |
static int |
TIMER_J |
static TransactionState |
TRYING_STATE
Trying state.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acquireSem()
A given tx can process only a single outstanding event at a time.
|
void |
addEventListener(SIPTransactionEventListener newListener)
Adds a new event listener to this transaction.
|
void |
cancelMaxTxLifeTimeTimer() |
void |
cleanUp() |
void |
close()
Close the encapsulated channel.
|
void |
disableRetransmissionTimer()
Turns off retransmission events for this transaction.
|
void |
disableTimeoutTimer()
Disabled the timeout timer.
|
boolean |
doesCancelMatchTransaction(SIPRequest requestToTest)
A method that can be used to test if an incoming request belongs to this
transction.
|
List<String> |
extractCertIdentities()
Extract identities from certificates exchanged over TLS, based on guidelines
from rfc5922.
|
void |
fireRetransmissionTimer()
Called by the transaction stack when a retransmission timer fires.
|
void |
fireTimeoutTimer()
This method is called when this transaction's timeout timer has fired.
|
void |
fireTimer()
Fired after each timer tick.
|
Object |
getApplicationData()
Get the application data associated with this transaction.
|
long |
getAuditTag() |
int |
getBaseTimerInterval() |
String |
getBranch()
Gets the current setting for the branch parameter of this transaction.
|
String |
getBranchId()
Returns a unique branch identifer that identifies this transaction.
|
String |
getCipherSuite()
Return the Cipher Suite that was used for the SSL handshake.
|
long |
getCSeq()
Get the Sequence number of the request used to create the transaction.
|
Dialog |
getDialog()
Gets the dialog object of this Transaction object.
|
String |
getForkId()
Retrieves the fork id for the transaction.
|
String |
getHost()
return the ip address on which this message was initially received
|
int |
getInternalState()
Gets the current state of this transaction.
|
String |
getKey() |
SIPResponse |
getLastResponse()
Get the last response.
|
Certificate[] |
getLocalCertificates()
Get the certificate(s) that were sent to the peer during handshaking.
|
String |
getMergeId() |
MessageChannel |
getMessageChannel()
Returns the message channel used for transmitting/receiving messages for
this transaction.
|
MessageProcessor |
getMessageProcessor() |
String |
getMethod()
Get the method of the request used to create this transaction.
|
SIPRequest |
getOriginalRequest()
Gets the request being handled by this transaction.
|
String |
getPeerAddress()
Returns the IP address of the upstream/downstream hop from which this message was initially received
|
Certificate[] |
getPeerCertificates() |
InetAddress |
getPeerPacketSourceAddress() |
int |
getPeerPacketSourcePort() |
int |
getPeerPort()
Returns the port of the upstream/downstream hop from which this message was initially received
|
String |
getPeerProtocol() |
int |
getPort()
return the port on which this message was initially received
|
ReleaseReferencesStrategy |
getReleaseReferencesStrategy()
retrieve the value of release references to know if the stack performs optimizations
on cleanup to save on memory
|
Request |
getRequest()
Get the original request but cast to a Request structure.
|
Response |
getResponse()
Get the JAIN interface response
|
int |
getRetransmitTimer()
Returns the current value of the retransmit timer in milliseconds used to
retransmit messages over unreliable transports.
|
SipProviderImpl |
getSipProvider()
Return the SipProvider for which the transaction is assigned.
|
SIPTransactionStack |
getSIPStack() |
TransactionState |
getState()
Gets the current state of this transaction.
|
int |
getT2() |
int |
getT4() |
int |
getTimerD()
Sets the value of Timer D (in ms)
|
int |
getTimerI() |
int |
getTimerK() |
int |
getTimerT2()
Retrieve the value of Timer T2 (in ms)
|
int |
getTimerT4()
Retrieve the value of Timer T4 (in ms)
|
String |
getTransactionId()
Get the transaction Id.
|
String |
getTransport()
Returns the name of the protocol with which this message was initially received
|
Via |
getViaHeader()
Returns the Via header for this channel.
|
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.
|
int |
hashCode()
Hashcode method for fast hashtable lookup.
|
boolean |
isByeTransaction()
Return a flag that states if this is a BYE transaction.
|
boolean |
isCancelTransaction()
Return true if the transaction corresponds to a CANCEL message.
|
boolean |
isDialogCreatingTransaction()
Returns a flag stating whether this transaction is for a request that creates a dialog.
|
boolean |
isInviteTransaction()
Returns a flag stating whether this transaction is for an INVITE request
or not.
|
boolean |
isMessagePartOfTransaction(SIPMessage messageToTest)
Tests a message to see if it is part of this transaction.
|
boolean |
isReliable() |
boolean |
isSecure() |
boolean |
isServerTransaction()
A shortcut way of telling if we are a server transaction.
|
boolean |
isTerminated()
Tests if this transaction has terminated.
|
boolean |
isTransactionMapped() |
boolean |
passToListener()
Set true to pass the request up to the listener.
|
void |
raiseErrorEvent(int errorEventID)
Creates a SIPTransactionErrorEvent and sends it to all of the listeners
of this transaction.
|
void |
raiseIOExceptionEvent()
Raise an IO Exception event - this is used for reporting asynchronous IO
Exceptions that are attributable to this transaction.
|
void |
releaseSem()
Release the transaction semaphore.
|
void |
removeEventListener(SIPTransactionEventListener oldListener)
Removed an event listener from this transaction.
|
void |
scheduleMaxTxLifeTimeTimer() |
void |
semRelease() |
void |
sendMessage(SIPMessage messageToSend)
Process the message through the transaction and sends it to the SIP peer.
|
void |
setApplicationData(Object applicationData)
Set the application data pointer.
|
void |
setAuditTag(long auditTag) |
void |
setBranch(String newBranch)
Sets the Via header branch parameter used to identify this transaction.
|
void |
setCollectionTime(int collectionTime) |
void |
setDialog(SIPDialog sipDialog,
String dialogId)
set the dialog object.
|
void |
setEncapsulatedChannel(MessageChannel messageChannel)
Set the encapsuated channel.
|
void |
setForkId(String forkId)
Sets the fork id for the transaction.
|
void |
setOriginalRequest(SIPRequest newOriginalRequest)
Sets the request message that this transaction handles.
|
void |
setPassToListener()
Set the passToListener flag to true.
|
void |
setReleaseReferencesStrategy(ReleaseReferencesStrategy releaseReferenceStrategy)
If set to true it will release all references that it no longer needs.
|
void |
setRetransmitTimer(int retransmitTimer)
Sets the value of the retransmit timer to the newly supplied timer value.
|
void |
setState(int newState)
Changes the state of this transaction.
|
void |
setTimerD(int interval)
Sets the value of Timer D (in ms)
|
void |
setTimerT2(int interval)
Sets the value of Timer T2 (in ms)
|
void |
setTimerT4(int interval)
Sets the value of Timer T4 (in ms)
|
void |
setTransactionMapped(boolean transactionMapped) |
void |
startTransactionTimer()
Start the timer that runs the transaction state machine.
|
boolean |
testAndSetTransactionTerminatedEvent()
Flag to test if the terminated event is delivered.
|
terminate
static final int T1
static final int TIMER_A
static final int TIMER_B
static final int TIMER_J
static final int TIMER_F
static final int TIMER_H
static final TransactionState INITIAL_STATE
static final TransactionState TRYING_STATE
static final TransactionState CALLING_STATE
static final TransactionState PROCEEDING_STATE
static final TransactionState COMPLETED_STATE
static final TransactionState CONFIRMED_STATE
static final TransactionState TERMINATED_STATE
String getBranchId()
Transaction
getBranchId
in interface Transaction
void cleanUp()
void setOriginalRequest(SIPRequest newOriginalRequest)
newOriginalRequest
- Request being handled.SIPRequest getOriginalRequest()
Request getRequest()
getRequest
in interface Transaction
boolean isDialogCreatingTransaction()
boolean isInviteTransaction()
boolean isCancelTransaction()
boolean isByeTransaction()
MessageChannel getMessageChannel()
void setBranch(String newBranch)
newBranch
- New string used as the branch for this transaction.String getBranch()
String getMethod()
long getCSeq()
void setState(int newState)
newState
- New state of this transaction.int getInternalState()
TransactionState getState()
getState
in interface Transaction
boolean isTerminated()
String getHost()
TransactionExt
getHost
in interface TransactionExt
String getKey()
int getPort()
TransactionExt
getPort
in interface TransactionExt
SIPTransactionStack getSIPStack()
String getPeerAddress()
TransactionExt
getPeerAddress
in interface TransactionExt
int getPeerPort()
TransactionExt
getPeerPort
in interface TransactionExt
String getPeerProtocol()
int getPeerPacketSourcePort()
InetAddress getPeerPacketSourceAddress()
String getTransport()
TransactionExt
getTransport
in interface TransactionExt
boolean isReliable()
Via getViaHeader()
void sendMessage(SIPMessage messageToSend) throws IOException
messageToSend
- Message to send to the SIP peer.IOException
void addEventListener(SIPTransactionEventListener newListener)
newListener
- Listener to add.void removeEventListener(SIPTransactionEventListener oldListener)
oldListener
- Listener to remove.Dialog getDialog()
getDialog
in interface Transaction
Dialog
void setDialog(SIPDialog sipDialog, String dialogId)
sipDialog
- --
the dialog to set.dialogId
- --
the dialog id ot associate with the dialog.sint getRetransmitTimer()
getRetransmitTimer
in interface Transaction
String getViaHost()
SIPResponse getLastResponse()
Response getResponse()
String getTransactionId()
int hashCode()
int getViaPort()
boolean doesCancelMatchTransaction(SIPRequest requestToTest)
requestToTest
- is the request to test.void setRetransmitTimer(int retransmitTimer)
setRetransmitTimer
in interface Transaction
retransmitTimer
- -
the new integer value of the retransmit timer in milliseconds.void close()
boolean isSecure()
MessageProcessor getMessageProcessor()
void setApplicationData(Object applicationData)
setApplicationData
in interface Transaction
applicationData
- --
application data pointer to set. null clears the applicationd
data pointer.Object getApplicationData()
getApplicationData
in interface Transaction
void setEncapsulatedChannel(MessageChannel messageChannel)
SipProviderImpl getSipProvider()
getSipProvider
in interface TransactionExt
void raiseIOExceptionEvent()
boolean acquireSem()
void releaseSem()
boolean passToListener()
void setPassToListener()
String getCipherSuite() throws UnsupportedOperationException
TransactionExt
getCipherSuite
in interface TransactionExt
UnsupportedOperationException
Certificate[] getLocalCertificates() throws UnsupportedOperationException
TransactionExt
getLocalCertificates
in interface TransactionExt
UnsupportedOperationException
Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException
getPeerCertificates
in interface TransactionExt
SSLPeerUnverifiedException
List<String> extractCertIdentities() throws SSLPeerUnverifiedException
extractCertIdentities
in interface TransactionExt
SSLPeerUnverifiedException
boolean isMessagePartOfTransaction(SIPMessage messageToTest)
ReleaseReferencesStrategy getReleaseReferencesStrategy()
TransactionExt
getReleaseReferencesStrategy
in interface TransactionExt
void setReleaseReferencesStrategy(ReleaseReferencesStrategy releaseReferenceStrategy)
TransactionExt
setReleaseReferencesStrategy
in interface TransactionExt
int getTimerD()
TransactionExt
getTimerD
in interface TransactionExt
int getTimerT2()
TransactionExt
getTimerT2
in interface TransactionExt
int getTimerT4()
TransactionExt
getTimerT4
in interface TransactionExt
void setTimerD(int interval)
TransactionExt
setTimerD
in interface TransactionExt
interval
- value of Timer D (in ms)void setTimerT2(int interval)
TransactionExt
setTimerT2
in interface TransactionExt
interval
- value of Timer T2 (in ms)void setTimerT4(int interval)
TransactionExt
setTimerT4
in interface TransactionExt
interval
- value of Timer T4 (in ms)void setForkId(String forkId)
forkId
- String getForkId()
void cancelMaxTxLifeTimeTimer()
String getMergeId()
long getAuditTag()
void setAuditTag(long auditTag)
void semRelease()
boolean isTransactionMapped()
void setTransactionMapped(boolean transactionMapped)
void fireTimeoutTimer()
void raiseErrorEvent(int errorEventID)
errorEventID
- ID of the error to raise.void fireTimer()
boolean isServerTransaction()
void startTransactionTimer()
void fireRetransmissionTimer()
boolean testAndSetTransactionTerminatedEvent()
void scheduleMaxTxLifeTimeTimer()
void setCollectionTime(int collectionTime)
void disableRetransmissionTimer()
void disableTimeoutTimer()
int getTimerK()
int getTimerI()
int getT2()
int getT4()
int getBaseTimerInterval()
Copyright © 2016. All Rights Reserved.