|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | ||||||||||
| 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 |
addListeningPoint(ListeningPoint listeningPoint)
This method adds the supplied ListeningPoint to the list of ListeningPoints associated to this SipProvider. |
void |
addSipListener(SipListener sipListener)
This method registers the SipListener object to this SipProvider, once registered the SIP Listener recieve events emitted from the SipProvider. |
ContactHeader |
createContactForProvider(String transport)
|
boolean |
equals(Object obj)
|
ListeningPoint |
getListeningPoint()
Returns the ListeningPoint of this SipProvider. |
ListeningPoint |
getListeningPoint(String transport)
Get the listening point for a given transport. |
ListeningPoint[] |
getListeningPoints()
Returns all the ListeningPoints of this SipProvider. |
CallIdHeader |
getNewCallId()
Returns a unique CallIdHeader for identifying dialogues between two SIP applications. |
ClientTransaction |
getNewClientTransaction(Request request)
Before an application can send a new request it must first request a new client transaction to handle that Request. |
Dialog |
getNewDialog(Transaction transaction)
Create a dialog for the given transaction. |
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 created this SipProvider. |
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. |
boolean |
isAutomaticDialogSupportEnabled()
|
void |
removeListeningPoint(ListeningPoint listeningPoint)
Removes the specified ListeningPoint from this SipProvider. |
void |
removeListeningPoints()
Remove all the listening points for this sip provider. |
void |
removeSipListener(SipListener sipListener)
Removes the specified SipListener from this SipProvider. |
void |
sendRequest(Request request)
Sends the Request statelessly, that is no transaction record is associated with this action. |
void |
sendResponse(Response response)
Sends the Response statelessly, that is no transaction record is associated with this action. |
void |
setAutomaticDialogSupportEnabled(boolean automaticDialogSupportEnabled)
Enable or disable automatic dialog creation for this Provider. |
void |
setListeningPoint(ListeningPoint listeningPoint)
This method sets the ListeningPoint 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 ListeningPoint getListeningPoint(String transport)
SipProvider
getListeningPoint in interface SipProvidertransport - -- the transport for the listening point
public void handleEvent(EventObject sipEvent,
SIPTransaction transaction)
sipEvent - is the event to process.public boolean equals(Object obj)
public void addSipListener(SipListener sipListener)
throws TooManyListenersException
SipProvider
addSipListener in interface SipProvidersipListener - the SipListener to be registered with the SipProvider.
TooManyListenersException - when a new SipListener attempts to
register with the SipProvider when another SipListener is already
registered with this SipProvider.public ListeningPoint getListeningPoint()
SipProvider
getListeningPoint in interface SipProviderpublic CallIdHeader getNewCallId()
SipProvider
getNewCallId in interface SipProvider
public ClientTransaction getNewClientTransaction(Request request)
throws TransactionUnavailableException
SipProvider
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
SipProvider
getNewServerTransaction in interface SipProviderrequest - the Request message that the doesn't match an existing
transaction that the application decides to handle statefully.
TransactionUnavailableException - if a new transaction can not be created, for example
the next hop of the request can not be determined.
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.ServerTransactionpublic SipStack getSipStack()
SipProvider
getSipStack in interface SipProviderSipStackpublic void removeSipListener(SipListener sipListener)
SipProvider
removeSipListener in interface SipProvidersipListener - the SipListener to be removed from this SipProvider.
public void sendRequest(Request request)
throws SipException
SipProviderOnce 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 the SipProvider will not handle retranmissions for the Request. If these semantics are required it is the responsibility of the application not the SipProvider.
sendRequest in interface SipProviderrequest - the Request message to send statelessly
SipException - if the SipProvider cannot send the Request for any
reason.Request
public void sendResponse(Response response)
throws SipException
SipProvider
sendResponse in interface SipProviderresponse - the Response to send statelessly.
SipException - if the SipProvider cannot send the Response for any
reason.Response,
Responsepublic void setListeningPoint(ListeningPoint listeningPoint)
SipProvider
setListeningPoint in interface SipProvider
public Dialog getNewDialog(Transaction transaction)
throws SipException
SipProviderFor UAC's Forked calls are handled as follows: The response of a forked call that completes the initially created dialog will use the original dialog that is associated with the transaction. Subsequent responses that correspond to other branches of the fork ( ie. with the same From header tag, and Call ID but different To header tags) result in the creation of additional dialogs that are associated with these responses. The created dialog is made available to the UAC ( Listener ) via the method ResponseEvent.getDialog
Transactions that belong to the Dialog are automatically associated with the Dialog by the stack and can be retrieved with Transaction.getDialog().
getNewDialog in interface SipProvidertransaction - - transaction that is used to extract the relevant
information to create the dialog.
SipException - if one or more of the following is true: public void transactionErrorEvent(SIPTransactionErrorEvent transactionErrorEvent)
transactionErrorEvent in interface SIPTransactionEventListenertransactionErrorEvent - Error event.public ListeningPoint[] getListeningPoints()
SipProvider
getListeningPoints in interface SipProvider
public void addListeningPoint(ListeningPoint listeningPoint)
throws ObjectInUseException
SipProvider
addListeningPoint in interface SipProviderlisteningPoint - - the listening point to add to this ListeningPoint
ObjectInUseException - if the supplied ListeningPoint is being used
by another SipProvider or if there is already a ListeningPoint for the given transport.
public void removeListeningPoint(ListeningPoint listeningPoint)
throws ObjectInUseException
SipProvider
removeListeningPoint in interface SipProviderlisteningPoint - the ListenPoint to be removed from this SipProvider.
ObjectInUseException - if the ListeningPoint is already in use or
is the last ListeningPoint associated with this SipProvider.public void removeListeningPoints()
public void setAutomaticDialogSupportEnabled(boolean automaticDialogSupportEnabled)
SipProvider
setAutomaticDialogSupportEnabled in interface SipProviderautomaticDialogSupportEnabled - - enables or disables automatic dialog support for this provider.SipStackpublic boolean isAutomaticDialogSupportEnabled()
public ContactHeader createContactForProvider(String transport)
|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||