|
MjSip Stack v1.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.zoolu.sip.provider.SipInterface
SipInterface is actually the SIP SAP (Service Access Point) and can be used to send and receive SIP messages associated with a specific method, transaction, or dialog.
SipInterface provides a simple interface to the multiplexing function provided by the SipProvider layer.When receiving a message, the underling SipProvider first tries to look for a SipInterface associated to the corresponding transaction, then looks for a SipInterface associated to the corresponding dialog, then for a SipInterface associated to the corresponding method type, and finally for a SipInterface associated to ANY messages. If the present SipInterface id matches, the SipInterfaceListener method onReceivedMessage() is fired.
| Constructor Summary | |
SipInterface(SipProvider sip_provider,
Identifier id,
SipInterfaceListener listener)
Creates a new SipInterface. |
|
SipInterface(SipProvider sip_provider,
SipInterfaceListener listener)
Creates a new SipInterface. |
|
| Method Summary | |
void |
close()
Close the SipInterface. |
SipProvider |
getSipProvider()
Gets the SipProvider. |
void |
onReceivedMessage(SipProvider sip_provider,
Message message)
When a new Message is received by the SipProvider. |
ConnectionIdentifier |
sendMessage(Message msg)
Sends the message msg. |
ConnectionIdentifier |
sendMessage(Message msg,
ConnectionIdentifier conn_id)
Sends the message msg using the specified connection. |
ConnectionIdentifier |
sendMessage(Message msg,
java.lang.String proto,
java.lang.String dest_addr,
int dest_port,
int ttl)
Sends a Message, specifing the transport portocol, nexthop address and port. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SipInterface(SipProvider sip_provider,
SipInterfaceListener listener)
public SipInterface(SipProvider sip_provider,
Identifier id,
SipInterfaceListener listener)
| Method Detail |
public void close()
public SipProvider getSipProvider()
public ConnectionIdentifier sendMessage(Message msg,
java.lang.String proto,
java.lang.String dest_addr,
int dest_port,
int ttl)
This is a low level method and forces the message to be routed to a specific nexthop address, port and transport, regardless whatever the Via, Route, or request-uri, address to.
In case of connection-oriented transport, the connection is selected as follows:
- if an existing connection is found matching the destination
end point (socket), such connection is used, otherwise
- a new connection is established
public ConnectionIdentifier sendMessage(Message msg)
The destination for the request is computed as follows:
- if outbound_addr is set, outbound_addr and
outbound_port are used, otherwise
- if message has Route header with lr option parameter (i.e. RFC3261 compliant),
the first Route address is used, otherwise
- the request's Request-URI is considered.
The destination for the response is computed based on the sent-by parameter in the Via header field (RFC3261 compliant)
As transport it is used the protocol specified in the 'via' header field
In case of connection-oriented transport:
- if an already established connection is found matching the destination
end point (socket), such connection is used, otherwise
- a new connection is established
public ConnectionIdentifier sendMessage(Message msg,
ConnectionIdentifier conn_id)
public void onReceivedMessage(SipProvider sip_provider,
Message message)
onReceivedMessage in interface SipProviderListener
|
MjSip Stack v1.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||