private String getMockExceptionMessage(Throwable t, Throwable mt){ String msg = "mock error : " + mt.getMessage(); if (t != null){ msg = msg + ", invoke error is :" + StringUtils.toString(t); } return msg; }
private String getMockExceptionMessage(Throwable t, Throwable mt) { String msg = "mock error : " + mt.getMessage(); if (t != null) { msg = msg + ", invoke error is :" + StringUtils.toString(t); } return msg; }
private String getMockExceptionMessage(Throwable t, Throwable mt){ String msg = "mock error : " + mt.getMessage(); if (t != null){ msg = msg + ", invoke error is :" + StringUtils.toString(t); } return msg; }
private static String safeToString(Object data) { if (data == null) return null; String dataStr; try { dataStr = data.toString(); } catch (Throwable e) { dataStr = "<Fail toString of " + data.getClass() + ", cause: " + StringUtils.toString(e) + ">"; } return dataStr; }
private static String safeToString(Object data) { if (data == null) return null; String dataStr; try { dataStr = data.toString(); } catch (Throwable e) { dataStr = "<Fail toString of " + data.getClass() + ", cause: " + StringUtils.toString(e) + ">"; } return dataStr; }
public GenericException(Throwable cause) { super(StringUtils.toString(cause)); this.exceptionClass = cause.getClass().getName(); this.exceptionMessage = cause.getMessage(); }
public GenericException(Throwable cause) { super(StringUtils.toString(cause)); this.exceptionClass = cause.getClass().getName(); this.exceptionMessage = cause.getMessage(); }
protected Object decodeRequestData(ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
protected Object decodeData(ObjectInput input) throws IOException { try { return input.readObject(); } catch (ClassNotFoundException e) { throw new IOException("ClassNotFoundException: " + StringUtils.toString(e)); } } }
@Deprecated protected Object decodeHeartbeatData(ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
@Deprecated protected Object decodeHeartbeatData(Channel channel, ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
@Deprecated protected Object decodeHeartbeatData(ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
@Deprecated protected Object decodeHeartbeatData(Channel channel, ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
protected Object decodeRequestData(ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
protected Object decodeResponseData(ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
protected Object decodeEventData(Channel channel, ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
protected Object decodeData(ObjectInput input) throws IOException { try { return input.readObject(); } catch (ClassNotFoundException e) { throw new IOException("ClassNotFoundException: " + StringUtils.toString(e)); } } }
@Deprecated protected Object decodeHeartbeatData(ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
protected Object decodeEventData(Channel channel, ObjectInput in) throws IOException { try { return in.readObject(); } catch (ClassNotFoundException e) { throw new IOException(StringUtils.toString("Read object failed.", e)); } }
@Override public NextAction handleConnect(FilterChainContext ctx) throws IOException { Connection<?> connection = ctx.getConnection(); GrizzlyChannel channel = GrizzlyChannel.getOrAddChannel(connection, url, handler); try { handler.connected(channel); } catch (RemotingException e) { throw new IOException(StringUtils.toString(e)); } finally { GrizzlyChannel.removeChannelIfDisconnected(connection); } return ctx.getInvokeAction(); }