Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package test.tck.msgflow.callflows;
 
 
import  junit.framework.TestCase;

This is a Router for NON-SIP URI requests.

Author(s):
M. Ranganathan
public class NonSipUriRouter implements Router {
    int myPort = 5070;
    public static boolean routerWasConsulted = false;
    class HopImpl implements Hop {
        public String getHost() {
            return "127.0.0.1";
        }
        public int getPort() {
            return ;
        }
        public String getTransport() {
            return "udp";
        }
    }
    public NonSipUriRouterSipStack sipStackString outboundProxy) {
    }
    public void setMyPort ( int myPort ) {
        this. = myPort;
    }
    public Hop getOutboundProxy() {
        return new HopImpl();
    }
    public ListIterator getNextHops(Request request) {
        URI uri = request.getRequestURI();
        ScenarioHarness.assertTrue("Expected to be consulted only for tel uri",uri.getScheme().equals("tel"));
        LinkedList llist = new LinkedList();
        llist.add(new HopImpl());
        return llist.listIterator();
    }
    public Hop getNextHop(Request requestthrows SipException {
         = true;
        URI uri = request.getRequestURI();
        ScenarioHarness.assertTrue("expected to be consulted only for tel uri",uri.getScheme().equals("tel"));
        return new HopImpl();
    }
New to GrepCode? Check out our FAQ X