Examples of ResponseStatus


Examples of com.google.visualization.datasource.base.ResponseStatus

                new DataSourceParameters("reqId:90210;responseHandler:babylon;out:jsonp")
        ), this.getTestDataTable()).toString());
    }

    public void testGenerateJsonResponseError() throws DataSourceException {
        ResponseStatus responseStatus = new ResponseStatus(
                StatusType.ERROR,
                ReasonType.INTERNAL_ERROR,
                "this is me not you why it is that not knowing me cave man");

        String expected = "{\"version\":\"0.6\",\"reqId\":\"90210\",\"status\":\"error\",\"errors\":"
View Full Code Here

Examples of de.umass.lastfm.scrobble.ResponseStatus

            scrobbler = null;
        } else {
            try {
                logger.fine("Authorizing user: " + user);
                scrobbler = newScrobbler(CLIENT_ID, CLIENT_VERSION, user);
                ResponseStatus status = scrobbler.handshake(password);
                authorized = status.ok();
                if (!authorized) {
                    switch (status.getStatus()) {
                        case ResponseStatus.BADAUTH:
                        case ResponseStatus.BANNED:
                            config.setBoolean("lastfm.enabled", false);
                    }
                    logger.warning("Scrobbler handshake returned error: " + status.getMessage());
                }
            } catch (IOException e) {
                e.printStackTrace();
                authorized = false;
            }
View Full Code Here

Examples of net.roarsoftware.lastfm.scrobble.ResponseStatus

    long totalPlayed = now - startPlaybackTime;
    if (totalPlayed > 40) {
      try {
        Scrobbler scrobbler = getScrobbler(session);
        if (scrobbler != null) {
          ResponseStatus status = scrobbler.submit(currentTrack.getArtist(), currentTrack.getName(),
              currentTrack.getAlbum(), currentTrack.getDuration(), currentTrack.getPosition(),
              Source.USER, startPlaybackTime);
          LOGGER.debug("Submit OK: " + status.ok());
        } else {
          LOGGER.error("Can't scrobble now");
        }
      } catch (Exception e) {
        LOGGER.debug(e);
View Full Code Here

Examples of net.rubyeye.xmemcached.command.binary.ResponseStatus

          latch.await();
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
          done.set(true);
        }
        ResponseStatus responseStatus = ((BaseBinaryCommand) command)
            .getResponseStatus();
        switch (responseStatus) {
        case NO_ERROR:
          done.set(true);
          log.info("Authentication to "
View Full Code Here

Examples of net.rubyeye.xmemcached.command.binary.ResponseStatus

          latch.await();
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
          done.set(true);
        }
        ResponseStatus responseStatus = ((BaseBinaryCommand) command)
            .getResponseStatus();
        switch (responseStatus) {
        case NO_ERROR:
          done.set(true);
          log.info("Authentication to "
View Full Code Here

Examples of org.ejbca.core.protocol.ResponseStatus

    int iterationCount = 1024;
    String cmpRaAuthSecret = null;
    String keyId = getSenderKeyId(msg.getHeader());
    if (keyId != null) {
      try {
        ResponseStatus status = ResponseStatus.FAILURE;
        FailInfo failInfo = FailInfo.BAD_MESSAGE_CHECK;
        String failText = null;
        CmpPbeVerifyer verifyer = new CmpPbeVerifyer(msg.getMessage());       
        owfAlg = verifyer.getOwfOid();
        macAlg = verifyer.getMacOid();
View Full Code Here

Examples of org.ejbca.core.protocol.ResponseStatus

            } else if (ca.isUseUserStorage() && req.getPassword() == null) {
              String msg = intres.getLocalizedMessage("signsession.nopasswordinrequest");
                logSession.log(admin, ca.getCAId(), LogConstants.MODULE_CA, new java.util.Date(), req.getUsername(), null, LogConstants.EVENT_ERROR_CREATECERTIFICATE, msg);
                throw new SignRequestException(msg);
            } else {       
              ResponseStatus status = ResponseStatus.SUCCESS;
              FailInfo failInfo = null;
              String failText = null;
                Certificate cert = null;
              try {
            // If we haven't done so yet, authenticate user. (Only if we store UserData for this CA.)
                if (ca.isUseUserStorage()) {
                    data = authUser(admin, req.getUsername(), req.getPassword());
                } else {
                  data = suppliedUserData;
                }
                    PublicKey reqpk = req.getRequestPublicKey();
                    if (reqpk == null) {
                        logSession.log(admin, ca.getCAId(), LogConstants.MODULE_CA, new java.util.Date(), req.getUsername(), null, LogConstants.EVENT_ERROR_CREATECERTIFICATE, intres.getLocalizedMessage("signsession.nokeyinrequest"));
                        throw new InvalidKeyException("Key is null!");
                    }
                    // We need to make sure we use the users registered CA here
                    if (data.getCAId() != ca.getCAId()) {
                      failText = intres.getLocalizedMessage("signsession.wrongauthority", Integer.valueOf(ca.getCAId()), Integer.valueOf(data.getCAId()));
                        status = ResponseStatus.FAILURE;
                        failInfo = FailInfo.WRONG_AUTHORITY;
                        logSession.log(admin, ca.getCAId(), LogConstants.MODULE_CA, new java.util.Date(), req.getUsername(), null, LogConstants.EVENT_ERROR_CREATECERTIFICATE, failText);
                    }

                    if (status.equals(ResponseStatus.SUCCESS)) {
                      Date notBefore = req.getRequestValidityNotBefore(); // Optionally requested validity
                      Date notAfter = req.getRequestValidityNotAfter(); // Optionally requested validity
                      X509Extensions exts = req.getRequestExtensions(); // Optionally requested extensions
                      int keyusage = -1;
                      if (exts != null) {
View Full Code Here

Examples of org.jredis.protocol.ResponseStatus

       * So we have a Future<?> object, but is that the actual response?  No.  You need to wait
       * for it to actually complete.
       *
       * Here we're waiting using blocking semantics:  we wait until its done.
       */
          ResponseStatus response = fResp.get();
         
          /**
           * So we have our response at this point.  We can check it, etc.
           */
          if(response.isError()){
            Log.error("PING returned an ERR response -- is it an authorization issue?");
          }
        }
        catch (InterruptedException e) {
          /*
 
View Full Code Here

Examples of org.lilyproject.repository.api.ResponseStatus

    }

    private Record writeRecord(Record record) throws RepositoryException, InterruptedException{
        record = record.cloneRecord();
        Record originalRecord = record;
        ResponseStatus status = ResponseStatus.UP_TO_DATE;
        if (records.containsKey(record.getId())) {
            originalRecord = records.get(record.getId());
            record = merge(record, originalRecord);

            if (!originalRecord.equals(record)) {
View Full Code Here

Examples of org.springframework.web.bind.annotation.ResponseStatus

   * @param method the method
   */
  public ServletInvocableHandlerMethod(Object handler, Method method) {
    super(handler, method);

    ResponseStatus annotation = getMethodAnnotation(ResponseStatus.class);
    if (annotation != null) {
      this.responseStatus = annotation.value();
      this.responseReason = annotation.reason();
    }
  }
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.