Package org.apache.camel.component.salesforce.api

Examples of org.apache.camel.component.salesforce.api.SalesforceException


                final String reason = logoutGet.getReason();

                if (statusCode == HttpStatus.OK_200) {
                    LOG.info("Logout successful");
                } else {
                    throw new SalesforceException(
                            String.format("Logout error, code: [%s] reason: [%s]",
                                    statusCode, reason),
                            statusCode);
                }
                break;

            case HttpExchange.STATUS_EXCEPTED:
                final Throwable ex = logoutGet.getException();
                throw new SalesforceException("Unexpected logout exception: " + ex.getMessage(), ex);

            case HttpExchange.STATUS_CANCELLED:
                throw new SalesforceException("Logout request CANCELLED!", null);

            case HttpExchange.STATUS_EXPIRED:
                throw new SalesforceException("Logout request TIMEOUT!", null);

            default:
                throw new SalesforceException("Unknow status: " + done, null);
            }
        } catch (SalesforceException e) {
            throw e;
        } catch (Exception e) {
            String msg = "Logout error: " + e.getMessage();
            throw new SalesforceException(msg, e);
        } finally {
            // reset session
            accessToken = null;
            instanceUrl = null;
            // notify all session listeners of the new access token and instance url
View Full Code Here

TOP

Related Classes of org.apache.camel.component.salesforce.api.SalesforceException

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.