Examples of RemoteConnectionFailedException


Examples of com.caucho.bam.RemoteConnectionFailedException

                       String to,
                       String from,
                       Serializable query)
  {
    if (! _lifecycle.isActive()) {
      BamException exn = new RemoteConnectionFailedException(L.l("{0} is closed",
                                                                 this));
      exn.fillInStackTrace();
     
      getBroker().queryError(id, from, to, query,
                             BamError.create(exn));
      return;
    }
View Full Code Here

Examples of com.caucho.bam.RemoteConnectionFailedException

    } catch (RuntimeException e) {
      throw e;
    } catch (IOException e) {
      String msg = "Cannot connect to " + _url + "\n  " + e;
     
      throw new RemoteConnectionFailedException(msg, e);
    }
  }
View Full Code Here

Examples of com.caucho.bam.RemoteConnectionFailedException

    MessageStream stream = _actorStream;

    if (stream != null)
      return stream;
    else
      throw new RemoteConnectionFailedException("connection has been closed");
  }
View Full Code Here

Examples of com.caucho.bam.RemoteConnectionFailedException

      _bamClient = client;
   
      _deployAddress = "deploy@resin.caucho";
    } catch (RemoteConnectionFailedException e) {
      throw new RemoteConnectionFailedException(L.l("Connection to '{0}' failed for remote deploy. Check the server and make sure <resin:RemoteAdminService> is enabled in the resin.xml.\n  {1}",
                                                    url, e.getMessage()),
                                                e);
    }
  }
View Full Code Here

Examples of com.caucho.bam.RemoteConnectionFailedException

      _managerAddress = "manager@resin.caucho";
     
      if (_bamClient != null)
        return;
    } catch (RemoteConnectionFailedException e) {
      exn = new RemoteConnectionFailedException(L.l("Connection to '{0}:{1}' failed for remote admin. Check the server and make sure <resin:RemoteAdminService> is enabled in the resin.xml.\n  {1}",
                                                    host, serverPort,
                                                    e.getMessage()),
                                                    e);
     
      if (httpPort == 0)
        throw exn;
    }
   
    /*
    if (_bamClient == null) {
      throw new RemoteConnectionFailedException(L.l("Connection to '{0}:{1}' failed for remote admin. Check the server and make sure <resin:RemoteAdminService> is enabled in the resin.xml.\n",
                                                    host, serverPort));
    }
    */
   
    String url = "http://" + host + ":" + httpPort + "/hmtp";
   
    _url = url;
   
    HmtpClient client = new HmtpClient(url);
    try {
      client.setVirtualHost("admin.resin");

      client.connect(userName, password);

      _bamClient = client;
   
      _managerAddress = "manager@resin.caucho";
    } catch (RemoteConnectionFailedException e) {
      throw new RemoteConnectionFailedException(L.l("Connection to '{0}' failed for remote admin. Check the server and make sure <resin:RemoteAdminService> is enabled in the resin.xml.\n  {1}",
                                                    url, e.getMessage()),
                                                e);
    }
  }
View Full Code Here

Examples of com.caucho.bam.RemoteConnectionFailedException

    } catch (ActorException e) {
      _connException = e;

      throw _connException;
    } catch (IOException e) {
      _connException = new RemoteConnectionFailedException("Failed to connect to server at " + _url);

      throw _connException;
    }
  }
View Full Code Here

Examples of com.caucho.bam.RemoteConnectionFailedException

    ActorStream stream = _actorStream;

    if (stream != null)
      return stream;
    else
      throw new RemoteConnectionFailedException("connection has been closed");
  }
View Full Code Here

Examples of com.caucho.bam.RemoteConnectionFailedException

      _bamClient = client;
   
      _deployJid = "deploy@resin.caucho";
    } catch (RemoteConnectionFailedException e) {
      throw new RemoteConnectionFailedException(L.l("Connection to '{0}' failed for remote deploy. Check the server and make sure <resin:RemoteAdminService> is enabled in the resin.xml.\n  {1}",
                url, e.getMessage()),
            e);
    }
  }
View Full Code Here

Examples of org.jivesoftware.openfire.RemoteConnectionFailedException

                            // Include the invalid-id stream error condition in the response
                            writer.write(new StreamError(StreamError.Condition.invalid_id).toXML());
                            writer.flush();
                            // Thrown an error so <remote-connection-failed/> stream error
                            // condition is sent to the Originating Server
                            throw new RemoteConnectionFailedException("Invalid ID");
                        }
                        else if (isHostUnknown(doc.attributeValue("to"))) {
                            // Include the host-unknown stream error condition in the response
                            writer.write(
                                    new StreamError(StreamError.Condition.host_unknown).toXML());
                            writer.flush();
                            // Thrown an error so <remote-connection-failed/> stream error
                            // condition is sent to the Originating Server
                            throw new RemoteConnectionFailedException("Host unknown");
                        }
                        else if (!hostname.equals(doc.attributeValue("from"))) {
                            // Include the invalid-from stream error condition in the response
                            writer.write(
                                    new StreamError(StreamError.Condition.invalid_from).toXML());
                            writer.flush();
                            // Thrown an error so <remote-connection-failed/> stream error
                            // condition is sent to the Originating Server
                            throw new RemoteConnectionFailedException("Invalid From");
                        }
                        else {
                            boolean valid = "valid".equals(doc.attributeValue("type"));
                            Log.debug("ServerDialback: RS - Key was " + (valid ? "" : "NOT ") +
                                    "VERIFIED by the Authoritative Server for: " +
                                    hostname);
                            return valid;
                        }
                    }
                    else {
                        Log.debug("ServerDialback: db:verify answer was: " + doc.asXML());
                    }
                }
                catch (DocumentException e) {
                    Log.error("An error occured connecting to the Authoritative Server", e);
                    // Thrown an error so <remote-connection-failed/> stream error condition is
                    // sent to the Originating Server
                    throw new RemoteConnectionFailedException("Error connecting to the Authoritative Server");
                }

            }
            else {
                // Include the invalid-namespace stream error condition in the response
                writer.write(new StreamError(StreamError.Condition.invalid_namespace).toXML());
                writer.flush();
                // Thrown an error so <remote-connection-failed/> stream error condition is
                // sent to the Originating Server
                throw new RemoteConnectionFailedException("Invalid namespace");
            }
        }
        finally {
            try {
                Log.debug("ServerDialback: RS - Closing connection to Authoritative Server: " + hostname);
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.