| |
|
| java.lang.Object gov.nist.siplite.stack.MessageChannel gov.nist.siplite.stack.Transaction gov.nist.siplite.stack.ClientTransaction
ClientTransaction | public class ClientTransaction extends Transaction implements SIPServerResponseInterface(Code) | | Represents a client transaction.
version: JAIN-SIP-1.1 version: This code is in the public domain. version: version: Implements the following state machines. (FromHeader RFC 3261) version: |INVITE from TU version: Timer A fires |INVITE sent version: Reset A, V Timer B fires version: INVITE sent +-----------+ or Transport Err. version: +---------| |---------------+inform TU version: | | Calling | | version: +-------->| |-------------->| version: +-----------+ 2xx | version: | | 2xx to TU | version: | |1xx | version: 300-699 +---------------+ |1xx to TU | version: ACK sent | | | version: resp. to TU | 1xx V | version: | 1xx to TU -----------+ | version: | +---------| | | version: | | |Proceeding |-------------->| version: | +-------->| | 2xx | version: | +-----------+ 2xx to TU | version: | 300-699 | | version: | ACK sent, | | version: | resp. to TU| | version: | | | NOTE: version: | 300-699 V | version: | ACK sent +-----------+Transport Err. | transitions version: | +---------| |Inform TU | labeled with version: | | | Completed |-------------->| the event version: | +-------->| | | over the action version: | +-----------+ | to take version: | ^ | | version: | | | Timer D fires | version: +--------------+ | - | version: | | version: V | version: +-----------+ | version: | | | version: | Terminated|<--------------+ version: | | version: +-----------+ version: Figure 5: INVITE client transaction version: |Request from TU version: |send request version: Timer E V version: send request +-----------+ version: +---------| |-------------------+ version: | | Trying | Timer F | version: +-------->| | or Transport Err.| version: +-----------+ inform TU | version: 200-699 | | | version: resp. to TU | |1xx | version: +---------------+ |resp. to TU | version: | | | version: | Timer E V Timer F | version: | send req +-----------+ or Transport Err. | version: | +---------| | inform TU | version: | | |Proceeding |------------------>| version: | +-------->| |-----+ | version: | +-----------+ |1xx | version: | | ^ |resp to TU | version: | 200-699 | +--------+ | version: | resp. to TU | | version: | | | version: | V | version: | +-----------+ | version: | | | | version: | | Completed | | version: | | | | version: | +-----------+ | version: | ^ | | version: | | | Timer K | version: +--------------+ | - | version: | | version: V | version: NOTE: +-----------+ | version: | | | version: transitions | Terminated|<------------------+ version: labeled with | | version: the event +-----------+ version: over the action version: to take version: Figure 6: non-INVITE client transaction version:
|
ClientTransaction | protected ClientTransaction(SIPTransactionStack newSIPMessageStack, MessageChannel newChannelToHeaderUse)(Code) | | Creates a new client transaction.
Parameters: newSIPMessageStack - Transaction stack this transactionbelongs to. Parameters: newChannelToHeaderUse - Channel to encapsulate. |
clearEventPending | public synchronized void clearEventPending()(Code) | | Clears the event pending flag.
|
cloneWithNewLastResponse | public ClientTransaction cloneWithNewLastResponse(Response lastResponse)(Code) | | Create a new client transaction based on current.
Field lastResponse is filled by input parameter.
Parameters: lastResponse - last response new instance of client transaction. |
createAck | public Request createAck() throws SipException(Code) | | Creates an ACK request for this transaction
an ack request generated from the original request. throws: SipException - if transaction is in the wrong state to be acked. |
createCancel | public Request createCancel() throws SipException(Code) | | Creates a new Cancel message from the Request associated with this client
transaction. The CANCEL request, is used to cancel the previous request
sent by this client transaction. Specifically, it asks the UAS to cease
processing the request and to generate an error response to that request.
a cancel request generated from the original request. throws: SipException - if the request cannot be cancelled. |
fireRetransmissionTimer | protected void fireRetransmissionTimer()(Code) | | Called by the transaction stack when a retransmission timer
fires.
|
fireTimeoutTimer | protected void fireTimeoutTimer()(Code) | | Called by the transaction stack when a timeout timer fires.
|
getOutgoingViaHeader | public ViaHeader getOutgoingViaHeader()(Code) | | Gets the via header for an outgoing request.
the via header reader |
getProcessingInfo | public String getProcessingInfo()(Code) | | Gets the processing information.
processing information |
getRequestChannel | public MessageChannel getRequestChannel()(Code) | | Returns this transaction.
request channel transaction |
getViaHost | public String getViaHost()(Code) | | Gets the host of the recipient.
the via host |
getViaPort | public int getViaPort()(Code) | | Gets the port of the recipient.
the via port |
isMessagePartOfTransaction | public boolean isMessagePartOfTransaction(Message messageToHeaderTest)(Code) | | Deterines if the message is a part of this transaction.
Parameters: messageToHeaderTest - Message to check if it is part of thistransaction. True if the message is part of this transaction,false if not. |
isMessageTransOrMult | public boolean isMessageTransOrMult(Message messageToHeaderTest)(Code) | | Deterines if the message is a part of this transaction or it is
multiple 2xx response.
Parameters: messageToHeaderTest - Message to check if it is part of thistransaction. True if the message is part of this transaction,false if not. |
isMultipleResponse | public boolean isMultipleResponse(Response response)(Code) | | Deterines if the response is multiple (RFC 3261, 13.2.2.4).
Parameters: response - response for checkingtransaction. True if the input response has 2xx status, the currenttransaction has TERMINATED state and the To tag is not same asTo tag of current transaction. This method doesn't compare othermembers, it should be use with method isMessageTransOrMulttogether . |
isSecure | public boolean isSecure()(Code) | | Checks if connection is secure.
true if connection is secure. |
processResponse | public synchronized void processResponse(Response transactionResponse, MessageChannel sourceChannel) throws SIPServerException(Code) | | Processes a new response message through this transaction.
If necessary, this message will also be passed onto the TU.
Parameters: transactionResponse - Response to process. Parameters: sourceChannel - Channel that received this message. |
sendMessage | public void sendMessage(Message messageToHeaderSend) throws IOException(Code) | | Sends a request message through this transaction and
onto the client.
Parameters: messageToHeaderSend - Request to process and send. |
sendRequest | public void sendRequest() throws IOException, SipException(Code) | | Sends specified
gov.nist.siplite.message.Request on a unique
client transaction identifier. This method implies that the application
is functioning as either a User Agent Client or a Stateful proxy, hence
the underlying SipProvider acts statefully.
JAIN SIP defines a retransmission utility specific to user agent
behaviour and the default retransmission behaviour for each method.
When an application wishes to send a message, it creates a Request
message passes that Request to this method, this method returns the
cleintTransactionId generated by the SipProvider. The Request message
gets sent via the ListeningPoint that this SipProvider is attached to.
- User Agent Client - must not send a BYE on a confirmed INVITE until
it has received an ACK for its 2xx response or until the server
transaction times out.
throws: IOException - if an I/O error occured throws: SipException - if implementation cannot send request for anyother reason |
setEventPending | public synchronized void setEventPending()(Code) | | Sets the event pending flag.
|
setResponseInterface | public void setResponseInterface(SIPServerResponseInterface newRespondToHeader)(Code) | | Sets the real ResponseInterface this transaction encapsulates.
Parameters: newRespondToHeader - ResponseInterface to send messages to. |
setViaHost | protected void setViaHost(String host)(Code) | | Sets the port of the recipient.
Parameters: host - the new via host |
setViaPort | protected void setViaPort(int port)(Code) | | Sets the port of the recipient.
Parameters: port - the new via port |
Methods inherited from gov.nist.siplite.stack.MessageChannel | abstract public void close()(Code)(Java Doc) public String getHost()(Code)(Java Doc) public HostPort getHostPort()(Code)(Java Doc) abstract public String getKey()(Code)(Java Doc) public static String getKey(String inetAddr, int port, String transport)(Code)(Java Doc) public MessageProcessor getMessageProcessor()(Code)(Java Doc) abstract public String getPeerAddress()(Code)(Java Doc) public HostPort getPeerHostPort()(Code)(Java Doc) abstract public int getPeerPort()(Code)(Java Doc) public int getPort()(Code)(Java Doc) abstract public SIPMessageStack getSIPStack()(Code)(Java Doc) abstract public String getTransport()(Code)(Java Doc) public ViaHeader getViaHeader()(Code)(Java Doc) abstract public String getViaHost()(Code)(Java Doc) public HostPort getViaHostPort()(Code)(Java Doc) abstract public int getViaPort()(Code)(Java Doc) abstract public void handleException(SIPServerException ex)(Code)(Java Doc) abstract public boolean isReliable()(Code)(Java Doc) abstract public boolean isSecure()(Code)(Java Doc) protected void logMessage(Message sipMessage, String address, int port, long time)(Code)(Java Doc) public void logResponse(Response sipResponse, long receptionTime, String status)(Code)(Java Doc) abstract public void sendMessage(Message sipMessage) throws IOException(Code)(Java Doc) abstract protected void sendMessage(byte[] message, String receiverAddress, int receiverPort) throws IOException(Code)(Java Doc) public void sendMessage(Message sipMessage, String receiverAddress, int receiverPort) throws IOException(Code)(Java Doc)
|
|
|
|