private static Class<?>[] getDeclaredExceptions(ProcessFunction<?, ?> func) { return getDeclaredExceptions0(Type.SYNC, func.getClass(), func.getMethodName()); }
@Nullable private static TBase<?, ?> getResult(ProcessFunction<?, ?> func) { return getResult0(Type.SYNC, func.getClass(), func.getMethodName()); }
private static TBase<?, ?> getArgs(ProcessFunction<?, ?> func) { return getArgs0(Type.SYNC, func.getClass(), func.getMethodName()); }
private static TFieldIdEnum[] getArgFields(ProcessFunction<?, ?> func) { return getArgFields0(Type.SYNC, func.getClass(), func.getMethodName()); }
ThriftFunction(Class<?> serviceType, ProcessFunction<?, ?> func) throws Exception { this(serviceType, func.getMethodName(), func, Type.SYNC, getArgFields(func), getResult(func), getDeclaredExceptions(func)); }
private void handleException(int seqid, TProtocol oprot) throws TException { if (!isOneway()) { TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing " + getMethodName()); oprot.writeMessageBegin(new TMessage(getMethodName(), TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); } }
iprot.readMessageEnd(); TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); oprot.writeMessageBegin(new TMessage(getMethodName(), TMessageType.EXCEPTION, seqid)); x.write(oprot); oprot.writeMessageEnd(); result = getResult(iface, args); } catch (TTransportException ex) { LOGGER.error("Transport error while processing " + getMethodName(), ex); throw ex; } catch (TApplicationException ex) { LOGGER.error("Internal application error processing " + getMethodName(), ex); result = ex; msgType = TMessageType.EXCEPTION; } catch (Exception ex) { LOGGER.error("Internal error processing " + getMethodName(), ex); if(rethrowUnhandledExceptions()) throw new RuntimeException(ex.getMessage(), ex); if(!isOneway()) { result = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing " + getMethodName()); msgType = TMessageType.EXCEPTION; oprot.writeMessageBegin(new TMessage(getMethodName(), msgType, seqid)); result.write(oprot); oprot.writeMessageEnd();
private static TBase<?, ?> getArgs(ProcessFunction<?, ?> func) { return getArgs0(Type.SYNC, func.getClass(), func.getMethodName()); }
@Nullable private static TBase<?, ?> getResult(ProcessFunction<?, ?> func) { return getResult0(Type.SYNC, func.getClass(), func.getMethodName()); }
private static Class<?>[] getDeclaredExceptions(ProcessFunction<?, ?> func) { return getDeclaredExceptions0(Type.SYNC, func.getClass(), func.getMethodName()); }
@Nullable private static TBase<?, ?> getResult(ProcessFunction<?, ?> func) { return getResult0(Type.SYNC, func.getClass(), func.getMethodName()); }
private static TFieldIdEnum[] getArgFields(ProcessFunction<?, ?> func) { return getArgFields0(Type.SYNC, func.getClass(), func.getMethodName()); }
private static Class<?>[] getDeclaredExceptions(ProcessFunction<?, ?> func) { return getDeclaredExceptions0(Type.SYNC, func.getClass(), func.getMethodName()); }
@Nullable private static TBase<?, ?> getResult(ProcessFunction<?, ?> func) { return getResult0(Type.SYNC, func.getClass(), func.getMethodName()); }
private static TBase<?, ?> getArgs(ProcessFunction<?, ?> func) { return getArgs0(Type.SYNC, func.getClass(), func.getMethodName()); }
private static TFieldIdEnum[] getArgFields(ProcessFunction<?, ?> func) { return getArgFields0(Type.SYNC, func.getClass(), func.getMethodName()); }
private static Class<?>[] getDeclaredExceptions(ProcessFunction<?, ?> func) { return getDeclaredExceptions0(Type.SYNC, func.getClass(), func.getMethodName()); }
ThriftFunction(Class<?> serviceType, ProcessFunction<?, ?> func) throws Exception { this(serviceType, func.getMethodName(), func, Type.SYNC, getArgFields(func), getResult(func), getDeclaredExceptions(func)); }
ThriftFunction(Class<?> serviceType, ProcessFunction<?, ?> func) throws Exception { this(serviceType, func.getMethodName(), func, Type.SYNC, getArgFields(func), getResult(func), getDeclaredExceptions(func)); }
ThriftFunction(Class<?> serviceType, ProcessFunction<?, ?> func) throws Exception { this(serviceType, func.getMethodName(), func, Type.SYNC, getArgFields(func), getResult(func), getDeclaredExceptions(func)); }