예제 #1
0
 public static ResponseDefinition copyOf(ResponseDefinition original) {
   ResponseDefinition newResponseDef = new ResponseDefinition();
   newResponseDef.status = original.status;
   newResponseDef.body = original.body;
   newResponseDef.isBinaryBody = original.isBinaryBody;
   newResponseDef.bodyFileName = original.bodyFileName;
   newResponseDef.headers = original.headers;
   newResponseDef.fixedDelayMilliseconds = original.fixedDelayMilliseconds;
   newResponseDef.proxyBaseUrl = original.proxyBaseUrl;
   newResponseDef.fault = original.fault;
   newResponseDef.wasConfigured = original.wasConfigured;
   return newResponseDef;
 }
예제 #2
0
 public static ResponseDefinition browserProxy(Request originalRequest) {
   final ResponseDefinition response = new ResponseDefinition();
   response.browserProxyUrl = originalRequest.getAbsoluteUrl();
   return response;
 }
예제 #3
0
 public static ResponseDefinition notConfigured() {
   final ResponseDefinition response = new ResponseDefinition(HTTP_NOT_FOUND, (byte[]) null);
   response.wasConfigured = false;
   return response;
 }