|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgov.nist.javax.sip.SipProviderImpl
Implementation of the JAIN-SIP provider interface.
| Method Summary | |
void |
addSipListener(SipListener sipListener)
This method registers the SipListener object to this SipProvider, once registered the SIP Listener can send events on the SipProvider and recieve events emitted from the SipProvider. |
boolean |
equals(Object obj)
|
ListeningPoint |
getListeningPoint()
Returns the ListeningPoint of this SipProvider. |
CallIdHeader |
getNewCallId()
Returns a unique CallIdHeader for identifying dialogues between two SIP applications. |
ClientTransaction |
getNewClientTransaction(Request request)
Once an application wants to a send a new request it must first request a new client transaction identifier. |
ServerTransaction |
getNewServerTransaction(Request request)
An application has the responsibility of deciding to respond to a Request that does not match an existing server transaction. |
SipStack |
getSipStack()
Returns the SipStack that this SipProvider is attached to. |
void |
handleEvent(EventObject sipEvent,
SIPTransaction transaction)
Handle the SIP event - because we have only one listener and we are already in the context of a separate thread, we dont need to enque the event and signal another thread. |
void |
removeSipListener(SipListener sipListener)
Removes the SipListener from this SipProvider. |
void |
run()
|
void |
sendRequest(Request request)
Sends specified Request and returns void i.e.
|
void |
sendResponse(Response response)
Sends specified Response and returns void i.e.
|
void |
setListeningPoint(ListeningPoint listeningPoint)
This method sets the listening point of the SipProvider. |
void |
transactionErrorEvent(SIPTransactionErrorEvent transactionErrorEvent)
Invoked when an error has ocurred with a transaction. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void handleEvent(EventObject sipEvent,
SIPTransaction transaction)
sipEvent - is the event to process.public boolean equals(Object obj)
public void run()
run in interface Runnable
public void addSipListener(SipListener sipListener)
throws TooManyListenersException
If an attempt is made to re-register the existing SipListener this method returns silently. A previous SipListener must be removed from the SipProvider before another SipListener can be registered to the SipProvider.
addSipListener in interface SipProvidersipListener - the SipListener to be registered with the SipProvider.
TooManyListenersException - this exception is thrown when a new
SipListener attempts to register with the SipProvider when another
SipListener is already registered with this SipProvider.public ListeningPoint getListeningPoint()
getListeningPoint in interface SipProviderListeningPointpublic CallIdHeader getNewCallId()
getNewCallId in interface SipProvider
public ClientTransaction getNewClientTransaction(Request request)
throws TransactionUnavailableException
getNewClientTransaction in interface SipProviderrequest - the new Request message that is to handled statefully by
the ClientTransaction.
TransactionUnavailableException - if a new transaction can not be created, for example
the next hop of the request can not be determined.ClientTransaction
public ServerTransaction getNewServerTransaction(Request request)
throws TransactionAlreadyExistsException,
TransactionUnavailableException
getNewServerTransaction in interface SipProviderrequest - the Request message that the doesn't match an existing
transaction that the application decides to handle statefully.
TransactionAlreadyExistsException - if a transaction already exists
that is already handling this Request. This may happen if the application
gets retransmits of the same request before the initial transaction is
allocated.
TransactionUnavailableException - if a new transaction can not be created, for example
the next hop of the request can not be determined.ServerTransactionpublic SipStack getSipStack()
getSipStack in interface SipProviderSipStackpublic void removeSipListener(SipListener sipListener)
removeSipListener in interface SipProvider
public void sendRequest(Request request)
throws SipException
Request and returns void i.e.
no transaction record is associated with this action. This method
implies that the application is functioning statelessly specific to this
Request, hence the underlying SipProvider acts statelessly.
Once the Request message has been passed to this method, the SipProvider will forget about this Request. No transaction semantics will be associated with the Request and no retranmissions will occur on the Request by the SipProvider, if these semantics are required it is the responsibility of the application not the JAIN SIP Stack.
sendRequest in interface SipProviderrequest - - the Request message to send statelessly
SipException - if implementation cannot send request for any reasonRequest
public void sendResponse(Response response)
throws SipException
Response and returns void i.e.
no transaction record is associated with this action. This method implies
that the application is functioning as either a stateless proxy or a
stateless User Agent Server.
sendResponse in interface SipProviderresponse - - the Response to send statelessly.
SipException - if implementation cannot send
response for any reasonResponse,
Responsepublic void setListeningPoint(ListeningPoint listeningPoint)
JAIN SIP supports recieving messages from any port and interface that a server listens on for UDP, on that same port and interface for TCP in case a message may need to be sent using TCP, rather than UDP, if it is too large. In order to satisfy this functionality an application must create two SipProviders and set identical listeningPoints except for transport on each SipProvder.
Multiple SipProviders are prohibited to listen on the same listening point.
setListeningPoint in interface SipProviderlisteningPoint - the ListeningPoint of this SipProvider.ListeningPointpublic void transactionErrorEvent(SIPTransactionErrorEvent transactionErrorEvent)
transactionErrorEvent in interface SIPTransactionEventListenertransactionErrorEvent - Error event.
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||