public static void reportServerError(String messageName, String parameter) { reportServerError(messageName, parameter, true); }
public static void reportServerError(String messageName, String parameter) { reportServerError(messageName, parameter, true); }
public Object run() { try { f.setAccessible(true); f.set(o, v); } catch (IllegalAccessException ex) { reportServerError("FIELD_ACCESS_FAILURE", f.getType().getName()); } return null; } });
public Object run() { try { f.setAccessible(true); return f.get(o); } catch (IllegalAccessException ex) { reportServerError("FIELD_ACCESS_FAILURE", f.getType().getName()); } return null; } });
public Object run() { try { f.setAccessible(true); f.set(o, v); } catch (IllegalAccessException ex) { reportServerError("FIELD_ACCESS_FAILURE", f.getType().getName()); } return null; } });
public Object run() { try { f.setAccessible(true); return f.get(o); } catch (IllegalAccessException ex) { reportServerError("FIELD_ACCESS_FAILURE", f.getType().getName()); } return null; } });
public static Object extractFromMethod(Object requestObject, Method method, boolean logError) { try { Method methodToInvoke = checkProxy(method, requestObject); return methodToInvoke.invoke(requestObject); } catch (IllegalAccessException ex) { reportServerError("METHOD_ACCESS_FAILURE", method.getName(), logError); } catch (Exception ex) { reportServerError("METHOD_INJECTION_FAILURE", method.getName(), logError); } return null; }
public static Object extractFromMethod(Object requestObject, Method method, boolean logError) { try { Method methodToInvoke = checkProxy(method, requestObject); return methodToInvoke.invoke(requestObject); } catch (IllegalAccessException ex) { reportServerError("METHOD_ACCESS_FAILURE", method.getName(), logError); } catch (Exception ex) { reportServerError("METHOD_INJECTION_FAILURE", method.getName(), logError); } return null; }
public static void injectThroughMethod(Object requestObject, Method method, Object parameterValue, Message inMessage) { try { Method methodToInvoke = checkProxy(method, requestObject); methodToInvoke.invoke(requestObject, new Object[]{parameterValue}); } catch (IllegalAccessException ex) { reportServerError("METHOD_ACCESS_FAILURE", method.getName()); } catch (InvocationTargetException ex) { LOG.log(Level.SEVERE, ex.getCause().getMessage(), ex); Response r = JAXRSUtils.convertFaultToResponse(ex.getCause(), inMessage); if (r != null) { inMessage.getExchange().put(Response.class, r); throw new WebApplicationException(); } reportServerError("METHOD_ACCESS_FAILURE", method.getName()); } catch (Exception ex) { reportServerError("METHOD_INJECTION_FAILURE", method.getName()); } }
public static void injectThroughMethod(Object requestObject, Method method, Object parameterValue, Message inMessage) { try { Method methodToInvoke = checkProxy(method, requestObject); methodToInvoke.invoke(requestObject, new Object[]{parameterValue}); } catch (IllegalAccessException ex) { reportServerError("METHOD_ACCESS_FAILURE", method.getName()); } catch (InvocationTargetException ex) { Response r = JAXRSUtils.convertFaultToResponse(ex.getCause(), inMessage); if (r != null) { inMessage.getExchange().put(Response.class, r); throw new WebApplicationException(); } reportServerError("METHOD_ACCESS_FAILURE", method.getName()); } catch (Exception ex) { reportServerError("METHOD_INJECTION_FAILURE", method.getName()); } }
theValues = type.newInstance(); } catch (IllegalAccessException ex) { reportServerError("CLASS_ACCESS_FAILURE", type.getName()); } catch (Exception ex) { reportServerError("CLASS_INSTANTIATION_FAILURE", type.getName());
theValues = type.newInstance(); } catch (IllegalAccessException ex) { reportServerError("CLASS_ACCESS_FAILURE", type.getName()); } catch (Exception ex) { reportServerError("CLASS_INSTANTIATION_FAILURE", type.getName());
reportServerError("CLASS_ACCESS_FAILURE", paramType.getName()); } catch (Exception ex) { reportServerError("CLASS_INSTANTIATION_FAILURE", paramType.getName());
reportServerError("CLASS_ACCESS_FAILURE", paramType.getName()); } catch (Exception ex) { reportServerError("CLASS_INSTANTIATION_FAILURE", paramType.getName());
reportServerError("WRONG_PARAMETER_TYPE", pClass.getName()); return pClass.cast(result); } catch (ClassCastException ex) { reportServerError("WRONG_PARAMETER_TYPE", pClass.getName()); return null;
reportServerError("WRONG_PARAMETER_TYPE", pClass.getName());