javax.sip.package.html Maven / Gradle / Ivy
This package contains the main interfaces that model the architecture
from both an application developer and a stack vendor view.
- Application Developer View:
The application developer is concerned with implementing the
SipListener interface. This Interface defines the methods required by applications
to receive and process messages from a vendors SIP stack.
A SipProvider receives messages from the underlying SIP
network, which in turn encapsulates these messages as Events and passes
them to its registered SipListener.
An application must register with
a SipProvider to listen for Events by implementing the
SipListener interface.
A single SipListener interface is mandated in the architecture.
- Stack Vendors View:
The stack vendor implements all the interfaces in this specification
excluding the SipListener interface,
however the two most important interfaces
from the architecture point of view are the SipStack
and the SipProvider interfaces.
-
SipStack - This interface can be viewed as the stack management interface
of the architecture. The SipStack interface encapsulates the dynamic
management characteristics
of the SIP stack, such as ListeningPoints which encapsulate port
and transport. As well as the central
point for the creation and querying of SipProviders in the architecture
.
-
SipProvider - This interface can be viewed as the messaging
interface of the architecture. Multiple SipProviders are allowed
within the architecture. This interface defines the methods that allow
an application implementing the SipListener to register with the SipProvider
to recieve incoming requests and responses. The methods defined to
send SIP messages are also defined within the SipProvider interface.
Messaging model:
The architecture specifies that outgoing messages are sent via the
SipProvider and can either be of type Request
or Response. This action is initiated
by the application. Incoming messages
on the other hand are passed to an application registered to the SipProvider
and can either be of type RequestEvent or
ResponseEvent, each containing a Request
or Response message respectively. This architecture follows the Listener/Provider event
model, which is suitable for applications that are unsure when the next event
will arrive i.e. the applications listens for it.