test_class.declarator: TEST_CONTENT = "This is a test"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_CONTENT = "This is a test";
test_class.type: String
test_class.var_name: TEST_CONTENT
test_class.declarator: log
test_class.modifier: private
test_class.original_string: private Log log;
test_class.type: Log
test_class.var_name: log
test_class.declarator: threadPool
test_class.modifier: private
test_class.original_string: private ScheduledExecutorService threadPool;
test_class.type: ScheduledExecutorService
test_class.var_name: threadPool
test_class.declarator: copier
test_class.modifier: private
test_class.original_string: private HttpClientHttpContentCopier copier;
test_class.type: HttpClientHttpContentCopier
test_class.var_name: copier
test_class.declarator: webServer
test_class.modifier: private
test_class.original_string: private NettyWebServer webServer;
test_class.type: NettyWebServer
test_class.var_name: webServer
test_class.declarator: webServerPort
test_class.modifier: private
test_class.original_string: private int webServerPort;
test_class.type: int
test_class.var_name: webServerPort
test_class.declarator: webServerUriPrefix
test_class.modifier: private
test_class.original_string: private String webServerUriPrefix;
test_class.type: String
test_class.var_name: webServerUriPrefix
test_class.file: interactivespaces-core/src/test/java/interactivespaces/util/web/HttpClientHttpContentCopierTest.java
test_class.identifier: HttpClientHttpContentCopierTest
test_case.body: @Test
    public void testFileUploadFile() throws Exception {
      File source = getTempFile();
      final File destination = getTempFile();
  
      FileSupportImpl.INSTANCE.writeFile(source, TEST_CONTENT);
  
      final AtomicReference<Map<String, String>> receivedParameters =
          new AtomicReference<Map<String, String>>();
      final CountDownLatch latch = new CountDownLatch(1);
  
      webServer.setHttpFileUploadListener(new HttpFileUploadListener() {
        @Override
        public void handleHttpFileUpload(HttpFileUpload fileUpload) {
          fileUpload.moveTo(destination);
          receivedParameters.set(fileUpload.getParameters());
          latch.countDown();
        }
      });
  
      String sourceParameterName = "myfile";
      Map<String, String> expectedParameters = Maps.newHashMap();
      expectedParameters.put("foo", "bar");
      expectedParameters.put("bletch", "spam");
  
      copier.copyTo(getUrlPrefix(), source, sourceParameterName, expectedParameters);
  
      Assert.assertTrue(latch.await(10, TimeUnit.SECONDS));
  
      Assert.assertEquals(TEST_CONTENT, FileSupportImpl.INSTANCE.readFile(destination).trim());
      Assert.assertEquals(expectedParameters, receivedParameters.get());
    }
test_case.class_method_signature: HttpClientHttpContentCopierTest.testFileUploadFile()
test_case.full_signature: @Test public void testFileUploadFile()
test_case.identifier: testFileUploadFile
test_case.invocations: getTempFile getTempFile writeFile setHttpFileUploadListener moveTo set getParameters countDown newHashMap put put copyTo getUrlPrefix assertTrue await assertEquals trim readFile assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFileUploadFile()
focal_class.declarator: TOTAL_CONNECTIONS_ALLOWED_DEFAULT = 20
focal_class.modifier: public static final
focal_class.original_string: public static final int TOTAL_CONNECTIONS_ALLOWED_DEFAULT = 20;
focal_class.type: int
focal_class.var_name: TOTAL_CONNECTIONS_ALLOWED_DEFAULT
focal_class.declarator: BUFFER_SIZE = 4096
focal_class.modifier: private static final
focal_class.original_string: private static final int BUFFER_SIZE = 4096;
focal_class.type: int
focal_class.var_name: BUFFER_SIZE
focal_class.declarator: httpClient
focal_class.modifier: private
focal_class.original_string: private HttpClient httpClient;
focal_class.type: HttpClient
focal_class.var_name: httpClient
focal_class.declarator: httpConnectionManager
focal_class.modifier: private
focal_class.original_string: private ThreadSafeClientConnManager httpConnectionManager;
focal_class.type: ThreadSafeClientConnManager
focal_class.var_name: httpConnectionManager
focal_class.declarator: totalConnectionsAllowed
focal_class.modifier: private final
focal_class.original_string: private final int totalConnectionsAllowed;
focal_class.type: int
focal_class.var_name: totalConnectionsAllowed
focal_class.file: interactivespaces-core/src/main/java/interactivespaces/util/web/HttpClientHttpContentCopier.java
focal_class.identifier: HttpClientHttpContentCopier
focal_class.interfaces: implements HttpContentCopier
focal_class.class_method_signature: HttpClientHttpContentCopier.HttpClientHttpContentCopier()
focal_class.full_signature: public  HttpClientHttpContentCopier()
focal_class.identifier: HttpClientHttpContentCopier
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  HttpClientHttpContentCopier()
focal_class.class_method_signature: HttpClientHttpContentCopier.HttpClientHttpContentCopier(int totalConnectionsAllowed)
focal_class.full_signature: public  HttpClientHttpContentCopier(int totalConnectionsAllowed)
focal_class.identifier: HttpClientHttpContentCopier
focal_class.modifiers: public
focal_class.parameters: (int totalConnectionsAllowed)
focal_class.signature:  HttpClientHttpContentCopier(int totalConnectionsAllowed)
focal_class.class_method_signature: HttpClientHttpContentCopier.startup()
focal_class.full_signature: @Override public void startup()
focal_class.identifier: startup
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startup()
focal_class.class_method_signature: HttpClientHttpContentCopier.shutdown()
focal_class.full_signature: @Override public void shutdown()
focal_class.identifier: shutdown
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdown()
focal_class.class_method_signature: HttpClientHttpContentCopier.getContentAsString(String sourceUri)
focal_class.full_signature: @Override public String getContentAsString(String sourceUri)
focal_class.identifier: getContentAsString
focal_class.modifiers: @Override public
focal_class.parameters: (String sourceUri)
focal_class.return: String
focal_class.signature: String getContentAsString(String sourceUri)
focal_class.class_method_signature: HttpClientHttpContentCopier.getContentAsString(String sourceUri, Charset charset)
focal_class.full_signature: @Override public String getContentAsString(String sourceUri, Charset charset)
focal_class.identifier: getContentAsString
focal_class.modifiers: @Override public
focal_class.parameters: (String sourceUri, Charset charset)
focal_class.return: String
focal_class.signature: String getContentAsString(String sourceUri, Charset charset)
focal_class.class_method_signature: HttpClientHttpContentCopier.copy(String sourceUri, File destinationFile)
focal_class.full_signature: @Override public void copy(String sourceUri, File destinationFile)
focal_class.identifier: copy
focal_class.modifiers: @Override public
focal_class.parameters: (String sourceUri, File destinationFile)
focal_class.return: void
focal_class.signature: void copy(String sourceUri, File destinationFile)
focal_class.class_method_signature: HttpClientHttpContentCopier.copyTo(String destinationUri, File source, String sourceParameterName, Map<String, String> params)
focal_class.full_signature: @Override public void copyTo(String destinationUri, File source, String sourceParameterName, Map<String, String> params)
focal_class.identifier: copyTo
focal_class.modifiers: @Override public
focal_class.parameters: (String destinationUri, File source, String sourceParameterName, Map<String, String> params)
focal_class.return: void
focal_class.signature: void copyTo(String destinationUri, File source, String sourceParameterName, Map<String, String> params)
focal_class.class_method_signature: HttpClientHttpContentCopier.copyTo(String destinationUri, InputStream source, String sourceFileName, String sourceParameterName,
        Map<String, String> params)
focal_class.full_signature: @Override public void copyTo(String destinationUri, InputStream source, String sourceFileName, String sourceParameterName,
        Map<String, String> params)
focal_class.identifier: copyTo
focal_class.modifiers: @Override public
focal_class.parameters: (String destinationUri, InputStream source, String sourceFileName, String sourceParameterName,
        Map<String, String> params)
focal_class.return: void
focal_class.signature: void copyTo(String destinationUri, InputStream source, String sourceFileName, String sourceParameterName,
        Map<String, String> params)
focal_class.class_method_signature: HttpClientHttpContentCopier.getTotalConnectionsAllowed()
focal_class.full_signature: @Override public int getTotalConnectionsAllowed()
focal_class.identifier: getTotalConnectionsAllowed
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getTotalConnectionsAllowed()
focal_class.class_method_signature: HttpClientHttpContentCopier.doCopyTo(String destinationUri, String sourceParameterName, Map<String, String> params,
        AbstractContentBody contentBody)
focal_class.full_signature: private void doCopyTo(String destinationUri, String sourceParameterName, Map<String, String> params,
        AbstractContentBody contentBody)
focal_class.identifier: doCopyTo
focal_class.modifiers: private
focal_class.parameters: (String destinationUri, String sourceParameterName, Map<String, String> params,
        AbstractContentBody contentBody)
focal_class.return: void
focal_class.signature: void doCopyTo(String destinationUri, String sourceParameterName, Map<String, String> params,
        AbstractContentBody contentBody)
focal_method.body: @Override
    public void copyTo(String destinationUri, File source, String sourceParameterName, Map<String, String> params) {
      FileBody contentBody = new FileBody(source);
  
      doCopyTo(destinationUri, sourceParameterName, params, contentBody);
    }
focal_method.class_method_signature: HttpClientHttpContentCopier.copyTo(String destinationUri, File source, String sourceParameterName, Map<String, String> params)
focal_method.full_signature: @Override public void copyTo(String destinationUri, File source, String sourceParameterName, Map<String, String> params)
focal_method.identifier: copyTo
focal_method.invocations: doCopyTo
focal_method.modifiers: @Override public
focal_method.parameters: (String destinationUri, File source, String sourceParameterName, Map<String, String> params)
focal_method.return: void
focal_method.signature: void copyTo(String destinationUri, File source, String sourceParameterName, Map<String, String> params)