org.mobicents.servlet.sip.proxy
Class ProxyImpl

java.lang.Object
  extended by 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

Field Summary
protected  SipURI pathURI
           
protected  SipURI recordRouteURI
           
 
Constructor Summary
ProxyImpl()
           
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()
           
 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,java.lang.Object> getTransactionMap()
           
 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 writeExternal(java.io.ObjectOutput out)
           
 
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()

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

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)

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

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,java.lang.Object> 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


Copyright © 2010. All Rights Reserved.