Examples of HTTPSettings


Examples of com.sun.jini.jeri.internal.http.HttpSettings


    private OutboundRequest nextRequest(final Constraints.Distilled distilled)
  throws IOException
    {
  HttpSettings settings = getHttpSettings();
  String phost = settings.getProxyHost(host);
  boolean usingProxy = (phost.length() != 0);
  int pport;
  boolean ppersist;

  // If looking for a connection through an HTTP proxy, and if the
  // pingProxyConnectionTimeout has passed, then ping the server
  // endpoint to verify that the endpoint is alive and reachable.
  // This reduces the likelihood that a server endpoint having
  // terminated or having become unreachable won't be noticed
  // until after some or all of the data destined for the server
  // has already been sent to the proxy.

  if (!usingProxy) {
      pport = -1;
      ppersist = true;
  } else {
      pport = settings.getProxyPort();
      ppersist = !settings.getDisableProxyPersistentConnections();

      SecurityManager sm = System.getSecurityManager();
      if (sm != null) {
    sm.checkConnect(host, port);
      }

      long now = System.currentTimeMillis();
      if (settings.getPingProxyConnections() &&
    now - timeLastVerified >
                          settings.getPingProxyConnectionTimeout())
      {
    Object obj = connectionAction(distilled, phost, pport, ppersist,
              new ConnectionAction() {
            public Object run(Connection conn)
          throws IOException
View Full Code Here

Examples of com.sun.jini.jeri.internal.http.HttpSettings

   * null.
   */
  HttpsConnection connect(CallContext context)
      throws IOException
  {
      HttpSettings settings = getHttpSettings();
      String phost = settings.getProxyHost(endpoint.serverHost);
      int pport = (phost.length() == 0) ? 0 : settings.getProxyPort();
      HttpsConnection result;
      synchronized (this) {
    List reap = new ArrayList(0);
    if (!(proxyHost.equals(phost) && proxyPort == pport)) {
        proxyHost = phost;
View Full Code Here

Examples of com.sun.jini.jeri.internal.http.HttpSettings


    private OutboundRequest nextRequest(final Constraints.Distilled distilled)
  throws IOException
    {
  HttpSettings settings = getHttpSettings();
  String phost = settings.getProxyHost(host);
  boolean usingProxy = (phost.length() != 0);
  int pport;
  boolean ppersist;

  // If looking for a connection through an HTTP proxy, and if the
  // pingProxyConnectionTimeout has passed, then ping the server
  // endpoint to verify that the endpoint is alive and reachable.
  // This reduces the likelihood that a server endpoint having
  // terminated or having become unreachable won't be noticed
  // until after some or all of the data destined for the server
  // has already been sent to the proxy.

  if (!usingProxy) {
      pport = -1;
      ppersist = true;
  } else {
      pport = settings.getProxyPort();
      ppersist = !settings.getDisableProxyPersistentConnections();

      SecurityManager sm = System.getSecurityManager();
      if (sm != null) {
    sm.checkConnect(host, port);
      }

      long now = System.currentTimeMillis();
      if (settings.getPingProxyConnections() &&
    now - timeLastVerified >
                          settings.getPingProxyConnectionTimeout())
      {
    Object obj = connectionAction(distilled, phost, pport, ppersist,
              new ConnectionAction() {
            public Object run(Connection conn)
          throws IOException
View Full Code Here

Examples of com.sun.jini.jeri.internal.http.HttpSettings

    // won't be noticed until after some or all of the data
    // destined for the server has already been sent to the
    // proxy.

    if (connection.usesHttpProxy()) {
        HttpSettings settings = getHttpSettings();
        if (settings.getPingProxyConnections()) {
      long timeout = settings.getPingProxyConnectionTimeout();
      long now = System.currentTimeMillis();
      if (now - timeLastVerified > timeout) {
          pingEndpoint(connection);
          // The ping succeeded, but the connection
          // cannot be reused as it was marked idle.
View Full Code Here

Examples of org.jboss.dashboard.ui.HTTPSettings

    }

    protected String getParameterMarkup(String name, Object value) {
        StringBuffer sb = new StringBuffer();
        try {
            HTTPSettings webSettings = HTTPSettings.lookup();
            sb.append(URLEncoder.encode(name, webSettings.getEncoding())).append("=").append(URLEncoder.encode(String.valueOf(value), webSettings.getEncoding()));
        } catch (UnsupportedEncodingException e) {
            log.error("Error: ", e);
        }
        return sb.toString();
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.HTTPSettings

    public final void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
        if (initSuccess) {
            Factory.doWork(new FactoryWork() {
                public void doWork() {
                    try {
                        HTTPSettings webSettings = HTTPSettings.lookup();
                        request.setCharacterEncoding(webSettings.getEncoding());
                    } catch (UnsupportedEncodingException e) {
                        log.error("Error: ", e);
                    }

                    // Init the request context.
View Full Code Here

Examples of org.jboss.dashboard.ui.HTTPSettings

        this.providerId = providerId;
    }

    public String getId() {
        try {
            HTTPSettings fr = HTTPSettings.lookup();
            return GROUP_PREFFIX + Base64.encode(groupName.getBytes(fr.getEncoding()));
        } catch (UnsupportedEncodingException e) {
            log.error("Error: ", e);
        }
        return GROUP_PREFFIX + Base64.encode(groupName.getBytes());
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.HTTPSettings

        if (currentLang != null) return currentLang;
        return currentLang = getLocaleManager().getCurrentLang();
    }

    protected String getEncoding() {
        HTTPSettings fr = HTTPSettings.lookup();
        return fr.getEncoding();
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.HTTPSettings

     * @param response Object that encapsulates the response from the servlet.
     */
    public final void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
        if (initSuccess) {
            try {
                HTTPSettings webSettings = HTTPSettings.lookup();
                request.setCharacterEncoding(webSettings.getEncoding());
            } catch (UnsupportedEncodingException e) {
                log.error("Error: ", e);
            }

            // Init the request.
View Full Code Here

Examples of org.jboss.dashboard.ui.HTTPSettings

    }

    protected String getParameterMarkup(String name, Object value) {
        StringBuffer sb = new StringBuffer();
        try {
            HTTPSettings webSettings = HTTPSettings.lookup();
            sb.append(URLEncoder.encode(name, webSettings.getEncoding())).append("=").append(URLEncoder.encode(String.valueOf(value), webSettings.getEncoding()));
        } catch (UnsupportedEncodingException e) {
            log.error("Error: ", e);
        }
        return sb.toString();
    }
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.