org.mobicents.servlet.sip.proxy
Class ProxyImpl
java.lang.Object
org.mobicents.servlet.sip.proxy.ProxyImpl
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, Proxy, ProxyExt
public class ProxyImpl
- extends java.lang.Object
- implements Proxy, ProxyExt, java.io.Externalizable
- Author:
- root
- See Also:
- Serialized Form
|
Method Summary |
void |
addProxyBranch(ProxyBranchImpl proxyBranchImpl)
|
boolean |
allResponsesHaveArrived()
|
void |
cancel()
|
void |
cancel(java.lang.String[] protocol,
int[] reasonCode,
java.lang.String[] reasonText)
|
void |
cancelAllExcept(ProxyBranch except,
java.lang.String[] protocol,
int[] reasonCode,
java.lang.String[] reasonText,
boolean throwExceptionIfCannotCancel)
|
java.util.List<ProxyBranch> |
createProxyBranches(java.util.List<? extends URI> targets)
|
boolean |
getAckReceived()
|
boolean |
getAddToPath()
|
SipServletResponseImpl |
getBestResponse()
|
int |
getBestResponseSent()
|
java.lang.String |
getCallerFromHeader()
|
ProxyBranchImpl |
getFinalBranchForSubsequentRequests()
|
boolean |
getNoCancel()
|
SipServletRequest |
getOriginalRequest()
|
SipURI |
getOutboundInterface()
|
boolean |
getParallel()
|
SipURI |
getPathURI()
|
SipURI |
getPreviousNode()
|
int |
getProxy1xxTimeout()
|
ProxyBranch |
getProxyBranch(URI uri)
|
java.util.List<ProxyBranch> |
getProxyBranches()
|
java.util.Map<URI,ProxyBranchImpl> |
getProxyBranchesMap()
|
int |
getProxyTimeout()
|
ProxyTimerService |
getProxyTimerService()
|
boolean |
getRecordRoute()
|
SipURI |
getRecordRouteURI()
|
boolean |
getRecurse()
|
int |
getSequentialSearchTimeout()
|
SipFactoryImpl |
getSipFactoryImpl()
|
boolean |
getStateful()
|
boolean |
getSupervised()
|
java.util.HashMap<java.lang.String,TransactionApplicationData> |
getTransactionMap()
|
boolean |
isTerminationSent()
|
void |
onBranchTimeOut(ProxyBranchImpl branch)
|
void |
onFinalResponse(ProxyBranchImpl branch)
|
void |
proxyTo(java.util.List<? extends URI> uris)
|
void |
proxyTo(URI uri)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
sendFinalResponse(SipServletResponseImpl response,
ProxyBranchImpl proxyBranch)
|
void |
setAckReceived(boolean received)
|
void |
setAddToPath(boolean p)
|
void |
setCallerFromHeader(java.lang.String initiatorFromHeader)
|
void |
setNoCancel(boolean isNoCancel)
|
void |
setOriginalRequest(SipServletRequestImpl originalRequest)
|
void |
setOutboundInterface(java.net.InetAddress inetAddress)
|
void |
setOutboundInterface(java.net.InetSocketAddress inetSocketAddress)
|
void |
setOutboundInterface(SipURI outboundInterface)
|
void |
setParallel(boolean parallel)
|
void |
setProxy1xxTimeout(int timeout)
|
void |
setProxyTimeout(int seconds)
|
void |
setRecordRoute(boolean rr)
|
void |
setRecurse(boolean recurse)
|
void |
setSequentialSearchTimeout(int seconds)
|
void |
setSipFactoryImpl(SipFactoryImpl sipFactoryImpl)
|
void |
setStateful(boolean stateful)
|
void |
setSupervised(boolean supervised)
|
void |
startNextUntriedBranch()
|
void |
startProxy()
|
void |
storeTerminationInformation(boolean store)
|
void |
terminateSession(SipSession session,
int calleeResponseCode,
java.lang.String calleeResponseText,
int callerResponseCode,
java.lang.String callerResponseText)
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pathURI
protected transient SipURI pathURI
recordRouteURI
protected transient SipURI recordRouteURI
ProxyImpl
public ProxyImpl()
ProxyImpl
public ProxyImpl(SipServletRequestImpl request,
SipFactoryImpl sipFactoryImpl)
cancel
public void cancel()
- Specified by:
cancel in interface Proxy
cancel
public void cancel(java.lang.String[] protocol,
int[] reasonCode,
java.lang.String[] reasonText)
- Specified by:
cancel in interface Proxy
cancelAllExcept
public void cancelAllExcept(ProxyBranch except,
java.lang.String[] protocol,
int[] reasonCode,
java.lang.String[] reasonText,
boolean throwExceptionIfCannotCancel)
createProxyBranches
public java.util.List<ProxyBranch> createProxyBranches(java.util.List<? extends URI> targets)
- Specified by:
createProxyBranches in interface Proxy
getAddToPath
public boolean getAddToPath()
- Specified by:
getAddToPath in interface Proxy
getOriginalRequest
public SipServletRequest getOriginalRequest()
- Specified by:
getOriginalRequest in interface Proxy
getParallel
public boolean getParallel()
- Specified by:
getParallel in interface Proxy
getPathURI
public SipURI getPathURI()
- Specified by:
getPathURI in interface Proxy
getProxyBranch
public ProxyBranch getProxyBranch(URI uri)
- Specified by:
getProxyBranch in interface Proxy
getProxyBranches
public java.util.List<ProxyBranch> getProxyBranches()
- Specified by:
getProxyBranches in interface Proxy
getProxyBranchesMap
public java.util.Map<URI,ProxyBranchImpl> getProxyBranchesMap()
getFinalBranchForSubsequentRequests
public ProxyBranchImpl getFinalBranchForSubsequentRequests()
- Returns:
- the finalBranchForSubsequentRequest
getProxyTimeout
public int getProxyTimeout()
- Specified by:
getProxyTimeout in interface Proxy
getRecordRoute
public boolean getRecordRoute()
- Specified by:
getRecordRoute in interface Proxy
getRecordRouteURI
public SipURI getRecordRouteURI()
- Specified by:
getRecordRouteURI in interface Proxy
getRecurse
public boolean getRecurse()
- Specified by:
getRecurse in interface Proxy
getSequentialSearchTimeout
public int getSequentialSearchTimeout()
- Specified by:
getSequentialSearchTimeout in interface Proxy
getStateful
public boolean getStateful()
- Specified by:
getStateful in interface Proxy
getSupervised
public boolean getSupervised()
- Specified by:
getSupervised in interface Proxy
proxyTo
public void proxyTo(java.util.List<? extends URI> uris)
- Specified by:
proxyTo in interface Proxy
proxyTo
public void proxyTo(URI uri)
- Specified by:
proxyTo in interface Proxy
setAddToPath
public void setAddToPath(boolean p)
- Specified by:
setAddToPath in interface Proxy
setParallel
public void setParallel(boolean parallel)
- Specified by:
setParallel in interface Proxy
setProxyTimeout
public void setProxyTimeout(int seconds)
- Specified by:
setProxyTimeout in interface Proxy
setRecordRoute
public void setRecordRoute(boolean rr)
- Specified by:
setRecordRoute in interface Proxy
setRecurse
public void setRecurse(boolean recurse)
- Specified by:
setRecurse in interface Proxy
setSequentialSearchTimeout
public void setSequentialSearchTimeout(int seconds)
- Specified by:
setSequentialSearchTimeout in interface Proxy
setStateful
public void setStateful(boolean stateful)
- Specified by:
setStateful in interface Proxy
setSupervised
public void setSupervised(boolean supervised)
- Specified by:
setSupervised in interface Proxy
startProxy
public void startProxy()
- Specified by:
startProxy in interface Proxy
getOutboundInterface
public SipURI getOutboundInterface()
onFinalResponse
public void onFinalResponse(ProxyBranchImpl branch)
throws DispatcherException
- Throws:
DispatcherException
onBranchTimeOut
public void onBranchTimeOut(ProxyBranchImpl branch)
throws DispatcherException
- Throws:
DispatcherException
startNextUntriedBranch
public void startNextUntriedBranch()
allResponsesHaveArrived
public boolean allResponsesHaveArrived()
sendFinalResponse
public void sendFinalResponse(SipServletResponseImpl response,
ProxyBranchImpl proxyBranch)
throws DispatcherException
- Throws:
DispatcherException
getBestResponse
public SipServletResponseImpl getBestResponse()
- Returns:
- the bestResponse
setOriginalRequest
public void setOriginalRequest(SipServletRequestImpl originalRequest)
getNoCancel
public boolean getNoCancel()
-
- Specified by:
getNoCancel in interface Proxy
setNoCancel
public void setNoCancel(boolean isNoCancel)
-
- Specified by:
setNoCancel in interface Proxy
getSipFactoryImpl
public SipFactoryImpl getSipFactoryImpl()
- Returns:
- the sipFactoryImpl
setSipFactoryImpl
public void setSipFactoryImpl(SipFactoryImpl sipFactoryImpl)
- Parameters:
sipFactoryImpl - the sipFactoryImpl to set
setOutboundInterface
public void setOutboundInterface(java.net.InetAddress inetAddress)
- Specified by:
setOutboundInterface in interface Proxy
setOutboundInterface
public void setOutboundInterface(java.net.InetSocketAddress inetSocketAddress)
- Specified by:
setOutboundInterface in interface Proxy
setOutboundInterface
public void setOutboundInterface(SipURI outboundInterface)
- Specified by:
setOutboundInterface in interface ProxyExt
setAckReceived
public void setAckReceived(boolean received)
getAckReceived
public boolean getAckReceived()
getPreviousNode
public SipURI getPreviousNode()
getCallerFromHeader
public java.lang.String getCallerFromHeader()
setCallerFromHeader
public void setCallerFromHeader(java.lang.String initiatorFromHeader)
getTransactionMap
public java.util.HashMap<java.lang.String,TransactionApplicationData> getTransactionMap()
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
getProxy1xxTimeout
public int getProxy1xxTimeout()
- Specified by:
getProxy1xxTimeout in interface ProxyExt
setProxy1xxTimeout
public void setProxy1xxTimeout(int timeout)
- Specified by:
setProxy1xxTimeout in interface ProxyExt
getProxyTimerService
public ProxyTimerService getProxyTimerService()
- Returns:
- the proxyTimerService
addProxyBranch
public void addProxyBranch(ProxyBranchImpl proxyBranchImpl)
storeTerminationInformation
public void storeTerminationInformation(boolean store)
throws java.lang.IllegalStateException
- Specified by:
storeTerminationInformation in interface ProxyExt
- Throws:
java.lang.IllegalStateException
terminateSession
public void terminateSession(SipSession session,
int calleeResponseCode,
java.lang.String calleeResponseText,
int callerResponseCode,
java.lang.String callerResponseText)
throws java.lang.IllegalStateException,
java.io.IOException
- Specified by:
terminateSession in interface ProxyExt
- Throws:
java.lang.IllegalStateException
java.io.IOException
isTerminationSent
public boolean isTerminationSent()
- Returns:
- the terminationInfo
getBestResponseSent
public int getBestResponseSent()
- Returns:
- the bestResponseSent
Copyright © 2011. All Rights Reserved.