Package com.alibaba.otter.shared.communication.core.exception

Examples of com.alibaba.otter.shared.communication.core.exception.CommunicationException


    /**
     * 指定manager,进行event调用
     */
    public Object callManager(final Event event) {
        CommunicationException ex = null;
        Object object = null;
        for (int i = index; i < index + managerAddress.size(); i++) { // 循环一次manager的所有地址
            String address = managerAddress.get(i % managerAddress.size());
            try {
                object = delegate.call(address, event);
View Full Code Here


    /**
     * 指定manager,进行event调用
     */
    public Object callManager(final Event event) {
        CommunicationException ex = null;
        Object object = null;
        for (int i = index; i < index + managerAddress.size(); i++) { // 循环一次manager的所有地址
            String address = managerAddress.get(i % managerAddress.size());
            try {
                object = delegate.call(address, event);
View Full Code Here

                if (method != null) {
                    try {
                        ReflectionUtils.makeAccessible(method);
                        return method.invoke(action, new Object[] { event });
                    } catch (Throwable e) {
                        throw new CommunicationException("method_invoke_error:" + methodName, e);
                    }
                } else {
                    throw new CommunicationException("no_method_error for["
                                                     + StringUtils.capitalize(event.getType().toString())
                                                     + "] in Class[" + action.getClass().getName() + "]");
                }

            }

            throw new CommunicationException("eventType_no_action", event.getType().name());
        } catch (RuntimeException e) {
            logger.error("endpoint_error", e);
            throw e;
        } catch (Exception e) {
            logger.error("endpoint_error", e);
            throw new CommunicationException(e);
        }
    }
View Full Code Here

                }
            }
        }

        logger.error("call[{}] failed , event[{}]!", addr, event.toString());
        throw new CommunicationException("call[" + addr + "] , Event[" + event.toString() + "]", ex);
    }
View Full Code Here

                }
            }
        }

        if (ex != null) {
            throw new CommunicationException(String.format("call addr[%s] error by %s", addrs[errorIndex],
                                                           ex.getMessage()), ex);
        } else {
            return result;
        }
    }
View Full Code Here

        }
        InetAddress address = null;
        try {
            address = InetAddress.getByName(strs[0]);
        } catch (UnknownHostException e) {
            throw new CommunicationException("addr_error", "addr[" + addr + "] is unknow!");
        }
        params.setIp(address.getHostAddress());
        params.setPort(Integer.valueOf(strs[1]));
        return params;
    }
View Full Code Here

        export.setAlwaysCreateRegistry(alwaysCreateRegistry);// 强制创建一个

        try {
            export.afterPropertiesSet();
        } catch (RemoteException e) {
            throw new CommunicationException("Rmi_Create_Error", e);
        }

    }
View Full Code Here

    public void destory() {
        try {
            export.destroy();
        } catch (RemoteException e) {
            throw new CommunicationException("Rmi_Destory_Error", e);
        }
    }
View Full Code Here

    public void destory() {
        try {
            pool.close();
        } catch (Exception e) {
            throw new CommunicationException("Connection_Pool_Close_Error", e);
        }
    }
View Full Code Here

            CommunicationConnectionPoolable poolable = new CommunicationConnectionPoolable(
                                                                                           (CommunicationConnection) pool.borrowObject(params),
                                                                                           this);
            return poolable;
        } catch (Exception e) {
            throw new CommunicationException("createConnection_error", e);
        }
    }
View Full Code Here

TOP

Related Classes of com.alibaba.otter.shared.communication.core.exception.CommunicationException

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.