Package org.jboss.fresh.events.net

Examples of org.jboss.fresh.events.net.ConnectorException


      Event ev = new Event(host, app, componentName, agentid, "ENet", "Ignore", null);

   
      if(reset) {
        reset = false;
        throw new ConnectorException("Reset forced");
      }

      synchronized(shellout) {
        ev.setID(String.valueOf(evid++));
        //shellout.write(pinf.procid, ev);
        shout.writeObject(ev);
        shout.flush();
      }

      if(reset) {
        reset = false;
        throw new ConnectorException("Reset forced");
      }

    } catch(Exception ex) {
      //log.error("Exception while pinging remote process: ", ex);
      throw new ConnectorException("Exception while pinging remote process: ", ex);
    }
  }
View Full Code Here


    try {
      sndT = Thread.currentThread();

      if(reset) {
        reset = false;
        throw new ConnectorException("Reset forced");
      }

      synchronized(shellout) {
        //shellout.writeBuffer(pinf.procid, (LinkedList) ls);
        Iterator it = ls.iterator();
        while(it.hasNext()) {
          shout.writeObject(it.next());
        }
        shout.flush();
      }

      if(reset) {
        reset = false;
        throw new ConnectorException("Reset forced");
      }

    } catch(org.jboss.fresh.shell.ShellIOException ex) {
      log.debug("CATCH  ShellIOException ");
      Throwable th = ex.getCause();
      if(th instanceof org.jboss.fresh.io.ApplicationIOException) {
        log.debug("CATCH  ApplicationIOException ");
        th = th.getCause();
        if(th instanceof org.jboss.fresh.events.net.TakenOverException) {
          log.debug("CATCH  TakenOverException ");
          throw (TakenOverException) th;
        }
      } else if(th instanceof ThrowableProxy) {
        log.debug("CATCH ThrowableProxy ");
        String cname = ((ThrowableProxy) th).getClassName();
        if("org.jboss.fresh.io.ApplicationIOException".equals(cname)) {
          log.debug("CATCH LC ApplicationIOException ");
          th = th.getCause();
          if(th instanceof ThrowableProxy) {
            log.debug("CATCH ThrowableProxy ");
            cname = ((ThrowableProxy) th).getClassName();
            if("org.jboss.fresh.events.net.TakenOverException".equals(cname)) {
              log.debug("CATCH LC TakenOverException ");
              throw new TakenOverException(th.getMessage());
            }
          }
        }
      }

      throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ")", ex);

    } catch(Exception ex) {
      //log.error("Exception while writing to remote process: (" + this + ", procid: " + shout.getProcID() + ")", ex);
      throw new ConnectorException("Exception while writing to remote process: (" + this + ", procid: " + shout.getProcID() + ")", ex);
    } finally {
      sndT = null;
    }

    //log.info("  done sending.");
View Full Code Here

            cname = ((ThrowableProxy) th).getClassName();
            if("org.jboss.fresh.events.net.TakenOverException".equals(cname)) {
              log.debug("CATCH LC TakenOverException ");
              throw new TakenOverException(th.getMessage());
            } else if("org.jboss.fresh.shell.UninitializedEnvironmentException".equals(cname)) {
              throw new ConnectorException(new org.jboss.fresh.shell.UninitializedEnvironmentException(th.getMessage()));
            }
          }
        }
      }
      log.debug("THROW ConnectorException ");
      throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ")  read buffer: " + ls, ex);

    } catch(IOException ex) {
      Throwable th = ex.getCause();
      if(th instanceof NoSuchProcessException)
        throw new TakenOverException(th.getMessage());
      else
        throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ")  read buffer: " + ls, ex);
    } catch(Exception ex) {
      //log.error("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ")  read buffer: " + ls, ex);
      throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ") ", ex);
    }

  }
View Full Code Here

TOP

Related Classes of org.jboss.fresh.events.net.ConnectorException

Copyright © 2018 www.massapicom. 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.