Package ch.rolandschaer.ascrblr.util

Examples of ch.rolandschaer.ascrblr.util.ServiceException


        case HttpURLConnection.HTTP_FORBIDDEN:
            throw new AuthenticationException(httpConn);

        default:
            throw new ServiceException(httpConn);
        }

    }
View Full Code Here


      return feed;
     
    } catch(SAXException e) {
     
      throw new ServiceException(e);
     
    } finally {
      if (resultStream != null) {
        resultStream.close();
      }
View Full Code Here

   
    logger.info("Handling error response " + responseType);
   
    if(responseType.equals("")) {
     
      throw new ServiceException("No valid response from server.");
     
    } else if( responseType.startsWith(ResponseType.BADAUTH.toString()) ) {
     
      throw new AuthenticationException("The submitted credentials are not valid.");
     
    } else if (responseType.startsWith(ResponseType.BANNED.toString()) ) {
     
      throw new ServiceException("You were banned from the service because of a protocol violation.");
     
    } else if( responseType.startsWith(ResponseType.BADTIME.toString()) ) {
     
      throw new ServiceException("The timestamp provided seems not valid. Try to correct the system clock.");
     
    } else if( responseType.startsWith(ResponseType.FAILED.toString()) ) {
     
      throw new ServiceException(responseType.substring(7));
     
    } else if (responseType.startsWith(ResponseType.BADSESSION.toString()) ) {

      throw new SessionExpiredException("Your session has expired please re-handshake service.");
     
View Full Code Here

   
    logger.info("Handling error response " + responseType);
   
    if (responseType.equals("")){
     
      throw new ServiceException("No valid response from server.");
     
    } else if( responseType.startsWith(ResponseType.BADAUTH.toString())
        || responseType.startsWith(ResponseType.BADUSER.toString()) ) {
     
      throw new AuthenticationException("The submitted credentials are not valid");
     
    } else if( responseType.startsWith(ResponseType.FAILED.toString()) ) {
     
      throw new ServiceException(responseType.substring(7));
     
    }

  }
View Full Code Here

   
    logger.info("Handling error response " + response);
   
    if( responseType.startsWith(ResponseType.FAILED.toString()) ) {
     
      throw new ServiceException(response.get("msg"));
     
   
  }
View Full Code Here

TOP

Related Classes of ch.rolandschaer.ascrblr.util.ServiceException

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.