org.mobicents.servlet.sip.proxy
Class ProxyImpl

java.lang.Object
  extended by org.mobicents.servlet.sip.proxy.ProxyImpl
All Implemented Interfaces:
java.io.Serializable, Proxy

public class ProxyImpl
extends java.lang.Object
implements Proxy, java.io.Serializable

Author:
root
See Also:
Serialized Form

Field Summary
protected  SipURI pathURI
           
protected  SipURI recordRouteURI
           
 
Constructor Summary
ProxyImpl(SipServletRequestImpl request, SipFactoryImpl sipFactoryImpl)
           
 
Method Summary
 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()
           
 ProxyBranchImpl getFinalBranchForSubsequentRequests()
           
 boolean getNoCancel()
          
 SipServletRequest getOriginalRequest()
           
 SipURI getOutboundInterface()
           
 boolean getParallel()
           
 SipURI getPathURI()
           
 ProxyBranch getProxyBranch(URI uri)
           
 java.util.List<ProxyBranch> getProxyBranches()
           
 int getProxyTimeout()
           
 boolean getRecordRoute()
           
 SipURI getRecordRouteURI()
           
 boolean getRecurse()
           
 int getSequentialSearchTimeout()
           
 SipFactoryImpl getSipFactoryImpl()
           
 boolean getStateful()
           
 boolean getSupervised()
           
 void onBranchTimeOut(ProxyBranchImpl branch)
           
 void onFinalResponse(ProxyBranchImpl branch)
           
 void proxyTo(java.util.List<? extends URI> uris)
           
 void proxyTo(URI uri)
           
 void sendFinalResponse(SipServletResponseImpl response, ProxyBranchImpl proxyBranch)
           
 void setAckReceived(boolean received)
           
 void setAddToPath(boolean p)
           
 void setNoCancel(boolean isNoCancel)
          
 void setOriginalRequest(SipServletRequestImpl originalRequest)
           
 void setOutboundInterface(java.net.InetAddress inetAddress)
          
 void setOutboundInterface(java.net.InetSocketAddress inetSocketAddress)
          
 void setParallel(boolean parallel)
           
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pathURI

protected transient SipURI pathURI

recordRouteURI

protected transient SipURI recordRouteURI
Constructor Detail

ProxyImpl

public ProxyImpl(SipServletRequestImpl request,
                 SipFactoryImpl sipFactoryImpl)
Method Detail

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

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)

onBranchTimeOut

public void onBranchTimeOut(ProxyBranchImpl branch)

startNextUntriedBranch

public void startNextUntriedBranch()

allResponsesHaveArrived

public boolean allResponsesHaveArrived()

sendFinalResponse

public void sendFinalResponse(SipServletResponseImpl response,
                              ProxyBranchImpl proxyBranch)

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

setAckReceived

public void setAckReceived(boolean received)

getAckReceived

public boolean getAckReceived()


Copyright © 2008. All Rights Reserved.