com.caucho.hessian.client.HessianConnectionException Java Examples
The following examples show how to use
com.caucho.hessian.client.HessianConnectionException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HessianProtocol.java From dubbo-2.6.5 with Apache License 2.0 | 5 votes |
@Override protected int getErrorCode(Throwable e) { if (e instanceof HessianConnectionException) { if (e.getCause() != null) { Class<?> cls = e.getCause().getClass(); if (SocketTimeoutException.class.equals(cls)) { return RpcException.TIMEOUT_EXCEPTION; } } return RpcException.NETWORK_EXCEPTION; } else if (e instanceof HessianMethodSerializationException) { return RpcException.SERIALIZATION_EXCEPTION; } return super.getErrorCode(e); }
Example #2
Source File: HessianClientInterceptor.java From spring-analysis-note with MIT License | 5 votes |
/** * Convert the given Hessian access exception to an appropriate * Spring RemoteAccessException. * @param ex the exception to convert * @return the RemoteAccessException to throw */ protected RemoteAccessException convertHessianAccessException(Throwable ex) { if (ex instanceof HessianConnectionException || ex instanceof ConnectException) { return new RemoteConnectFailureException( "Cannot connect to Hessian remote service at [" + getServiceUrl() + "]", ex); } else { return new RemoteAccessException( "Cannot access Hessian remote service at [" + getServiceUrl() + "]", ex); } }
Example #3
Source File: HessianClientInterceptor.java From java-technology-stack with MIT License | 5 votes |
/** * Convert the given Hessian access exception to an appropriate * Spring RemoteAccessException. * @param ex the exception to convert * @return the RemoteAccessException to throw */ protected RemoteAccessException convertHessianAccessException(Throwable ex) { if (ex instanceof HessianConnectionException || ex instanceof ConnectException) { return new RemoteConnectFailureException( "Cannot connect to Hessian remote service at [" + getServiceUrl() + "]", ex); } else { return new RemoteAccessException( "Cannot access Hessian remote service at [" + getServiceUrl() + "]", ex); } }
Example #4
Source File: HessianClientInterceptor.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Convert the given Hessian access exception to an appropriate * Spring RemoteAccessException. * @param ex the exception to convert * @return the RemoteAccessException to throw */ protected RemoteAccessException convertHessianAccessException(Throwable ex) { if (ex instanceof HessianConnectionException || ex instanceof ConnectException) { return new RemoteConnectFailureException( "Cannot connect to Hessian remote service at [" + getServiceUrl() + "]", ex); } else { return new RemoteAccessException( "Cannot access Hessian remote service at [" + getServiceUrl() + "]", ex); } }
Example #5
Source File: HessianProtocol.java From dubbox with Apache License 2.0 | 5 votes |
protected int getErrorCode(Throwable e) { if (e instanceof HessianConnectionException) { if (e.getCause() != null) { Class<?> cls = e.getCause().getClass(); if (SocketTimeoutException.class.equals(cls)) { return RpcException.TIMEOUT_EXCEPTION; } } return RpcException.NETWORK_EXCEPTION; } else if (e instanceof HessianMethodSerializationException) { return RpcException.SERIALIZATION_EXCEPTION; } return super.getErrorCode(e); }
Example #6
Source File: HessianProtocol.java From dubbox-hystrix with Apache License 2.0 | 5 votes |
protected int getErrorCode(Throwable e) { if (e instanceof HessianConnectionException) { if (e.getCause() != null) { Class<?> cls = e.getCause().getClass(); if (SocketTimeoutException.class.equals(cls)) { return RpcException.TIMEOUT_EXCEPTION; } } return RpcException.NETWORK_EXCEPTION; } else if (e instanceof HessianMethodSerializationException) { return RpcException.SERIALIZATION_EXCEPTION; } return super.getErrorCode(e); }
Example #7
Source File: HessianClientInterceptor.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * Convert the given Hessian access exception to an appropriate * Spring RemoteAccessException. * @param ex the exception to convert * @return the RemoteAccessException to throw */ protected RemoteAccessException convertHessianAccessException(Throwable ex) { if (ex instanceof HessianConnectionException || ex instanceof ConnectException) { return new RemoteConnectFailureException( "Cannot connect to Hessian remote service at [" + getServiceUrl() + "]", ex); } else { return new RemoteAccessException( "Cannot access Hessian remote service at [" + getServiceUrl() + "]", ex); } }
Example #8
Source File: HessianProtocol.java From dubbox with Apache License 2.0 | 5 votes |
protected int getErrorCode(Throwable e) { if (e instanceof HessianConnectionException) { if (e.getCause() != null) { Class<?> cls = e.getCause().getClass(); if (SocketTimeoutException.class.equals(cls)) { return RpcException.TIMEOUT_EXCEPTION; } } return RpcException.NETWORK_EXCEPTION; } else if (e instanceof HessianMethodSerializationException) { return RpcException.SERIALIZATION_EXCEPTION; } return super.getErrorCode(e); }
Example #9
Source File: HessianProtocol.java From dubbox with Apache License 2.0 | 5 votes |
protected int getErrorCode(Throwable e) { if (e instanceof HessianConnectionException) { if (e.getCause() != null) { Class<?> cls = e.getCause().getClass(); if (SocketTimeoutException.class.equals(cls)) { return RpcException.TIMEOUT_EXCEPTION; } } return RpcException.NETWORK_EXCEPTION; } else if (e instanceof HessianMethodSerializationException) { return RpcException.SERIALIZATION_EXCEPTION; } return super.getErrorCode(e); }