|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.echarts.Port
org.echarts.LocalPort
org.echarts.OutputPort
org.echarts.ExternalPort
org.echarts.servlet.sip.Port
org.echarts.servlet.sip.SipPort
public class SipPort
Port used for sending and receiving SIP messages. Can only be used for a single SIP dialog.
| Field Summary |
|---|
| Fields inherited from class org.echarts.servlet.sip.Port |
|---|
box, portMonitor |
| Fields inherited from class org.echarts.LocalPort |
|---|
inputQueue |
| Fields inherited from interface org.echarts.PortReference |
|---|
serialVersionUID |
| Method Summary | |
|---|---|
void |
bind(SipServletRequest req)
Set up a bidirectional association between this port and the SipSession to which this message belongs. |
void |
copyHeaders(SipServletMessage from,
SipServletMessage to)
Copy (safe, non-system) headers from one message to another. |
void |
copyNoBodyHeaders(SipServletMessage from,
SipServletMessage to)
Copy (safe, non-system) headers from one message to another. |
void |
copyRouteHeaders(SipServletRequest from,
SipServletRequest to,
java.util.ListIterator modRouteHeaders)
Copy route headers from one message to another. |
SipServletRequest |
createInvite(Address from,
Address to)
Create a new initial INVITE with the specified From and To and set up the bidirectional association between this port and its SipSession. |
SipServletRequest |
createInvite(SipServletRequest invite)
Create a new initial INVITE based on existing invite, and set up the bidirectional association between this port and its SipSession. |
SipServletRequest |
createInvite(SipServletRequest invite,
RequestModifier reqModifier)
Create a new initial INVITE based on existing invite, apply RequestModifier, and set up the bidirectional association between this port and its SipSession. |
SipServletRequest |
createInvite(SipServletRequest oldReq,
RequestModifier reqModifier,
SipApplicationRoutingDirective routingDirective)
Create a new initial INVITE, apply RequestModifier, and set up the bidirectional association between this port and its SipSession. |
SipServletRequest |
createInvite(URI from,
URI to)
Create a new initial INVITE with the specified From and To and set up the bidirectional association between this port and its SipSession. |
SipServletRequest |
createNoBodyInvite(SipServletRequest invite,
RequestModifier reqModifier,
SipApplicationRoutingDirective routingDirective)
Create a new initial INVITE, apply RequestModifier, and set up the bidirectional association between this port and its SipSession. |
SipServletRequest |
createNoBodyRequest(SipServletRequest oldreq)
Create a new non-initial SipServletRequest (e.g., re-INVITE, BYE, INFO) on this port/session based on the supplied request. |
SipServletResponse |
createNoBodyResponse(SipServletResponse oldResponse,
SipServletRequest req)
Create a SipServletResponse for the specified request, based on the specified response. |
SipServletRequest |
createRequest(SipServletRequest oldreq)
Create a new non-initial SipServletRequest (e.g., re-INVITE, BYE, INFO) on this port/session based on the supplied request. |
SipServletRequest |
createRequest(java.lang.String method)
Create a new non-initial SipServletRequest (e.g., re-INVITE, BYE, INFO) on this port/session. |
SipServletResponse |
createResponse(int status,
SipServletRequest req)
Create a SipServletResponse with the specified status for the specified request. |
SipServletResponse |
createResponse(SipServletResponse oldResponse,
SipServletRequest req)
Create a SipServletResponse for the specified request, based on the specified response. |
SipServletRequest |
createStatusMessage(java.lang.String type,
java.util.Properties props)
Create a Status message that can be read by other applications in the usage. |
void |
destroy()
Destroy port. |
java.lang.Object |
getAttribute(java.lang.String attrName)
Get the value of an attribute on the SipSession associated with this SipPort. |
SipServletRequest |
getInitialRequest()
get initial request for this port. |
java.lang.Object |
getLastReceivedSDP()
Returns the last SDP received on this SipPort. |
void |
input(SipServletMessage message)
Inputs a message to this port's FIFO. |
protected boolean |
isContainerRoute(SipURI routeURI,
SipServletMessage from)
Determine if a particular URI points to container address. |
boolean |
isReadyToInvalidate()
Returns true if associated SipSession is in a ready-to-invalidate state. |
boolean |
isValid()
Returns true if associated SipSession is valid. |
void |
output(java.lang.Object message,
Machine machine)
Outputs a message to the port's peer FIFO. |
void |
removeAttribute(java.lang.String attrName)
Remove an attribute from the SipSession associated with this SipPort. |
void |
setAttribute(java.lang.String attrName,
java.lang.Object attr)
Set the value an attribute on the SipSession associated with this SipPort. |
void |
setInitialRequest(SipServletRequest req)
set initial request for this port. |
| Methods inherited from class org.echarts.servlet.sip.Port |
|---|
getBox, isDestroyed |
| Methods inherited from class org.echarts.ExternalPort |
|---|
getMonitorProperties, getRemote, input, setPeer, toString |
| Methods inherited from class org.echarts.LocalPort |
|---|
clearMachineReference, getDynamicChildIndex, getDynamicParent, getInputQueue, isPossiblyReferencedBy, isPossiblyReferencedBySupermachineOf, isUniquelyReferenced, isUniquelyReferencedByMachine, setMachineReference |
| Methods inherited from class org.echarts.Port |
|---|
equals, getID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.echarts.PortReference |
|---|
getID |
| Method Detail |
|---|
public void bind(SipServletRequest req)
throws PortException
req - in SipSession to be bound to this port
PortExceptionpublic SipServletRequest createInvite(SipServletRequest invite)
invite - existing invite upon which to base created invite
public SipServletRequest createInvite(SipServletRequest invite,
RequestModifier reqModifier)
invite - existing invite upon which to base created invitereqModifier - desired RequestModifier to apply to existing invite
public SipServletRequest createInvite(Address from,
Address to)
from - desired From addressto - desired To address
public SipServletRequest createInvite(URI from,
URI to)
from - desired From addressto - desired To address
public SipServletRequest createInvite(SipServletRequest oldReq,
RequestModifier reqModifier,
SipApplicationRoutingDirective routingDirective)
invite - The original received INVITE request that is to be relayedreqModifier - Request modifier that may modify different headers in the created INVITE requestroutingDirective - Routing directive for the application router
public SipServletRequest createNoBodyInvite(SipServletRequest invite,
RequestModifier reqModifier,
SipApplicationRoutingDirective routingDirective)
invite - The original received INVITE request that is to be relayedreqModifier - Request modifier that may modify different headers in the created INVITE requestroutingDirective - Routing directive for the application router
public final SipServletRequest createRequest(java.lang.String method)
method - desired SIP method
public final SipServletRequest createRequest(SipServletRequest oldreq)
oldreq - existing request upon which to base new request
public final SipServletRequest createNoBodyRequest(SipServletRequest oldreq)
oldreq - existing request upon which to base new request
public final SipServletRequest createStatusMessage(java.lang.String type,
java.util.Properties props)
type - user-defined message typeprops - user-defined message properties
public final SipServletResponse createResponse(int status,
SipServletRequest req)
status - desired response codereq - to which to respond
public final SipServletResponse createResponse(SipServletResponse oldResponse,
SipServletRequest req)
oldResponse - existing response to base new response onreq - request to which to respond
public final SipServletResponse createNoBodyResponse(SipServletResponse oldResponse,
SipServletRequest req)
oldResponse - existing response to base new response onreq - request to which to respond
public final void copyHeaders(SipServletMessage from,
SipServletMessage to)
from - - old messageto - - new message
public final void copyNoBodyHeaders(SipServletMessage from,
SipServletMessage to)
from - - old messageto - - new message
public final void copyRouteHeaders(SipServletRequest from,
SipServletRequest to,
java.util.ListIterator modRouteHeaders)
from - - old messageto - - new messagemodRouteHeaders - - modified routespublic java.lang.Object getLastReceivedSDP()
public void setAttribute(java.lang.String attrName,
java.lang.Object attr)
attrName - attribute nameattr - attribute valuepublic java.lang.Object getAttribute(java.lang.String attrName)
attrName - attribute name
public void removeAttribute(java.lang.String attrName)
attrName - name of attribute to remove
protected boolean isContainerRoute(SipURI routeURI,
SipServletMessage from)
routeURI - URI to testfrom - received message
public void output(java.lang.Object message,
Machine machine)
throws java.rmi.RemoteException,
SessionMismatchException,
java.io.IOException,
PortException
output in class ExternalPortmessage - - message to be output by this port
PortException - - if message is not a SipServletMessage
SessionMismatchException - - if message was not created by this port
java.io.IOException - - from message.send()
java.rmi.RemoteException - - TODO
public void input(SipServletMessage message)
throws FeatureBoxException,
PortException
message - - message to be input for this port
FeatureBoxException - in case of FSM error
PortExceptionpublic final void setInitialRequest(SipServletRequest req)
req - initial requestpublic final SipServletRequest getInitialRequest()
public final void destroy()
destroy in class Portpublic final boolean isReadyToInvalidate()
SipSession.isReadyToInvalidate()public final boolean isValid()
SipSession.isValid()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||