Examples of Proxy


Examples of java.net.Proxy

        HttpURLConnection connection = null;
        ClientConfig config = request.getAttribute(ClientConfig.class);

        // setup proxy
        if (config.getProxyHost() != null) {
            Proxy proxy =
                new Proxy(Proxy.Type.HTTP, new InetSocketAddress(config.getProxyHost(), config
                    .getProxyPort()));
            connection = (HttpURLConnection)url.openConnection(proxy);
        } else {
            connection = (HttpURLConnection)url.openConnection();
        }
View Full Code Here

Examples of javassist.util.proxy.Proxy

      proxyClass = factory.createClass();
    }

    public Object getProxy() {
      try {
        final Proxy proxy = (Proxy) proxyClass.newInstance();
        proxy.setHandler( new PassThroughHandler( proxy, proxyClass.getName() ) );
        return proxy;
      }
      catch ( Throwable t ) {
        throw new HibernateException( "Unable to instantiated proxy instance" );
      }
View Full Code Here

Examples of javax.servlet.sip.Proxy

  protected void doRequest(SipServletRequest req) throws ServletException, IOException
  {
    if (req.isInitial())
    {
      Proxy proxy = req.getProxy();
      proxy.setRecordRoute(true);
      proxy.setSupervised(true);

      proxy.proxyTo(req.getRequestURI());
    }
  }
View Full Code Here

Examples of javax.servlet.sip.Proxy

    response.getApplicationSession().invalidate();
  }
 
  public void testProxy(SipServletRequest request) throws Exception
  {
    Proxy proxy = request.getProxy();
    proxy.setRecordRoute(true);
    proxy.setSupervised(false);
    proxy.proxyTo(request.getRequestURI());
  }
View Full Code Here

Examples of javax.servlet.sip.Proxy

  }
 
  public void proxy(URI uri) throws TooManyHopsException
  {
    SipServletRequest request = getRequest();
    Proxy proxy = request.getProxy();
    proxy.setSupervised(true);
    proxy.proxyTo(uri);
  }
View Full Code Here

Examples of javax.servlet.sip.Proxy

 
  public void handleRequest(SipRequest request) throws SipException, IOException
  {
    accessed();
   
    Proxy proxy = null;
   
    if (request.isInitial())
    {
      if (Log.isDebugEnabled())
        Log.debug("initial request {} for session {}", request.getRequestLine(), this);
     
      _localParty = (NameAddr) request.to().clone();
      _remoteParty = (NameAddr) request.from().clone();
      _callId = request.getCallId();
    }
    else
    {
      if (Log.isDebugEnabled())
        Log.debug("subsequent request {} for session {}", request.getRequestLine(), this);
     
      if (isUA())
      {
        _ua.handleRequest(request);
        if (request.isHandled())
          return;
      }
      else if (isProxy())
      {
        try
        {
          proxy = request.getProxy();
        }
        catch (TooManyHopsException e)
        {
          throw new SipException(SipServletResponse.SC_TOO_MANY_HOPS);
        }
      }
    }
    invokeServlet(request);
 
    if (proxy != null && !request.isCancel())
      proxy.proxyTo(request.getRequestURI())
  }
View Full Code Here

Examples of net.sf.sahi.Proxy

    refreshTrafficLink();
    setVisible(true);
  }

  private void startProxy() {
    final Proxy proxy = new Proxy(Configuration.getPort());
        currentInstance = proxy;
      proxy.start(true);
  }
View Full Code Here

Examples of net.sourceforge.jsocks.socks.Proxy

      "Usage: java Testclient testhost proxy [directhosts]");
   }

   static Proxy initProxy(String ps){
      java.util.StringTokenizer st = new java.util.StringTokenizer(ps,",;");
      Proxy proxy = null;
      while(st.hasMoreElements()){
         String entry = st.nextToken();
         Proxy p = Proxy.parseProxy(entry);
         if( p == null){
           log("Proxy "+entry+" invalid.");
           return null;
         }
         p.setChainProxy(proxy);
         proxy = p;
      }
      return proxy;
   }
View Full Code Here

Examples of org.apache.harmony.rmi.transport.proxy.Proxy

            // rmi.log.114=Creating socket to [{0}:{1}].
            proxyTransportLog.log(RMILog.BRIEF,
                    Messages.getString("rmi.log.114", host, port)); //$NON-NLS-1$
        }
        Socket s = null;
        Proxy proxy = new Proxy();

        if (disableDirectSocket) {
            // If direct connections are disabled, fallback to proxy connection.
            if (proxyTransportLog.isLoggable(RMILog.VERBOSE)) {
                // rmi.log.115=Direct socket connections disabled, trying proxy connection to [{0}:{1}].
                proxyTransportLog.log(RMILog.VERBOSE,
                        Messages.getString("rmi.log.115", //$NON-NLS-1$
                                host, port));
            }
        } else {
            if (disableHttp || !(proxy.isSet())) {
                // If HTTP is not available, use simple direct connection.
                s = directRsf.createSocket(host, port);

                if (s == null) {
                    // rmi.log.116=Unable to connect to [
View Full Code Here

Examples of org.apache.lenya.cms.publication.Proxy

            Policy policy = policyManager.getPolicy(accreditableManager, canonicalUrl);

            Document doc = builder.buildDocument(publication, canonicalUrl);

            Proxy proxy = doc.getPublication().getProxy(doc, policy.isSSLProtected());

            if (proxy != null) {
                value = proxy.getURL(doc);
            } else {
                // Take server name and port from request.
                Request request = ObjectModelHelper.getRequest(objectModel);
                value = "http://" + request.getServerName() + ":" + request.getServerPort()
                        + request.getContextPath() + doc.getCompleteURL();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.