com.atlassian.greenhopper.web.util
Class RestCall

java.lang.Object
  extended by com.atlassian.greenhopper.web.util.RestCall

public class RestCall
extends java.lang.Object

JIRA by default does not log REST call failures in atlassian-jira.log. So we now have a wrapper invoker class to make the rest call and log any errors. This will ensure that they go to the JIRA log and the GreenHopper log (if you use a com.atlassian.greenhopper logger say) and this will help with support as well.

Since:
5.8.7

Constructor Summary
RestCall(java.lang.Class restClass)
           
RestCall(org.apache.log4j.Logger logger)
           
 
Method Summary
 javax.ws.rs.core.Response response(java.util.concurrent.Callable<javax.ws.rs.core.Response> callable)
          This will invoke the Callable and return the response to the callee.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestCall

public RestCall(org.apache.log4j.Logger logger)

RestCall

public RestCall(java.lang.Class restClass)
Method Detail

response

public javax.ws.rs.core.Response response(java.util.concurrent.Callable<javax.ws.rs.core.Response> callable)
This will invoke the Callable and return the response to the callee. If an exception occurs it will log that into the appropriate logger.

Parameters:
callable - the REST call code that will respond to the rest call
Returns:
a REST Response


Copyright © 2007-2012 Atlassian. All Rights Reserved.