Examples of ConnectorException


Examples of com.calclab.emite.core.client.services.ConnectorException

        Log.debug("GWT CONNECTOR RECEIVED: " + res.getText());
        listener.onResponseReceived(res.getStatusCode(), res.getText());
    }
      });
  } catch (final RequestException e) {
      throw new ConnectorException(e.getMessage());
  } catch (final Exception e) {
      Log.error("Some GWT connector exception: " + e);
      throw new ConnectorException(e.getMessage());
  }
    }
View Full Code Here

Examples of com.skype.connector.ConnectorException

            eventLoop.start();
            try {
                latch.await();
            } catch (InterruptedException e) {
                SkypeFramework.quitApplicationEventLoop();
                throw new ConnectorException("The connector initialization was interrupted.", e);
            }
        }
    }
View Full Code Here

Examples of com.skype.connector.ConnectorException

            SkypeFramework.addSkypeFrameworkListener(listener);
            SkypeFramework.connect();
            latch.await();
            return getStatus();
        } catch(InterruptedException e) {
            throw new ConnectorException("Trying to connect was interrupted.", e);
        }
    }
View Full Code Here

Examples of com.skype.connector.ConnectorException

            } else if ("ERROR 68".equals(result)) {
                setStatus(Status.REFUSED);
            }
            return getStatus();
        } catch(InterruptedException e) {
            throw new ConnectorException("Trying to connect was interrupted.", e);
        }
    }
View Full Code Here

Examples of com.skype.connector.ConnectorException

                 
                retries--;
                Thread.sleep(1000);
            }
        } catch(InterruptedException e) {
            throw new ConnectorException("Trying to connect was interrupted.", e);
        }
    }
View Full Code Here

Examples of org.camunda.connect.ConnectorException

    if(connectorInstance == null) {
      synchronized (this) {
        if(connectorInstance == null) {
          connectorInstance = Connectors.getConnector(connectorId);
          if (connectorInstance == null) {
            throw new ConnectorException("No connector found for connector id '" + connectorId + "'");
          }
        }
      }
    }
  }
View Full Code Here

Examples of org.elfinder.servlets.ConnectorException

      File targetFile = getExistingFile(getParam("target"), dirCurrent, FileActionEnum.DELETE);
      File futureFile = getNewFile(getParam("name"), dirCurrent, FileActionEnum.WRITE);
      try {
        getFs().renameFileOrDirectory(targetFile, futureFile);
      } catch (FsException e) {
        throw new ConnectorException("Unable to rename file", e);
      }

      putResponse("select", _hash(targetFile));
      _content(dirCurrent, true);
    }
View Full Code Here

Examples of org.elfinder.servlets.ConnectorException

        int i = 0;
        for (FileItemStream uplFile : getListFiles()) {
          String fileName = getUploadedFileName(uplFile);
          ByteArrayOutputStream os = getListFileStreams().get(i);
          if (os == null) {
            throw new ConnectorException("Unable to save uploaded file");
          }

          checkUploadFile(fileName, os);

          File newFile = getNewFile(fileName, dirCurrent, FileActionEnum.WRITE);
          getFs().createFile(newFile, os);

          listeResponseSelect.add(_hash(newFile));
          i++;
        }

      } catch (ConnectorException e) {
        throw e;
      } catch (Exception e) {
        logger.error("", e);
        throw new ConnectorException("Unable to save uploaded file");
      }

      putResponse("select", listeResponseSelect);

      _content(dirCurrent, true);
View Full Code Here

Examples of org.elfinder.servlets.ConnectorException

    return uplFile.getName();
  }

  protected void checkUploadFile(String fileName, ByteArrayOutputStream os) throws ConnectorException {
    if (!_checkName(fileName)) {
      throw new ConnectorException("Invalid name");
    }
    if (!_isUploadAllow(fileName)) {
      throw new ConnectorException("Not allowed file type");
    }

    // check uploaded size
    int uploadSizeOctets = os.size();
    checkUploadSizes(uploadSizeOctets);
View Full Code Here

Examples of org.elfinder.servlets.ConnectorException

  }

  protected void checkUploadSizes(int uploadSizeOctets) throws ConnectorException {
    // check uploaded file size
    if (uploadSizeOctets > (getConfig().getUploadMaxSize() * 1024 * 1024)) {
      throw new ConnectorException("File exceeds the maximum allowed filesize");
    }

    // check total size
    long totalSizeOctets = getFs().getDirSize(getRootFile());
    if ((totalSizeOctets + uploadSizeOctets) > (getConfig().getUploadMaxSizeTotal() * 1024 * 1024)) {
      throw new ConnectorException("File exceeds the maximum allowed filesize");
    }
  }
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.