Examples of DownloadRequest


Examples of com.ngt.jopenmetaverse.shared.cap.http.DownloadManager.DownloadRequest

              return null;
            }
                };
               
           
            DownloadRequest req = new DownloadRequest(
                new URI(String.format("%s/?mesh_id=%s", url.toString(), meshID.toString())),
                Client.settings.CAPS_TIMEOUT,
                null,
                null,
                downloadCompletedCallback
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.cap.http.DownloadManager.DownloadRequest

          }
            };
       
        URI url = Client.network.getCurrentSim().Caps.CapabilityURI("GetTexture");

        DownloadRequest req = new DownloadRequest(
            new URI(String.format("%s/?texture_id=%s", url.toString(), textureID.toString())),
            Client.settings.CAPS_TIMEOUT,
            "image/x-j2c",
            progressHandler,downloadCompletedHanlder
        );
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.cap.http.DownloadManager.DownloadRequest

      for(int j =0; j< max/p; j++)
      {
      for(int i = 0; i< p; i++)
      {
        final int itemno = i;
        DownloadRequest request = new DownloadRequest(fileServer.createURI("/files/json/ex1.txt"), 5000,
            "*/*", new MethodDelegate<Void,HttpBaseDownloadProgressArg>()
            {
          public Void execute(HttpBaseDownloadProgressArg e) {
            return null;
          }
View Full Code Here

Examples of org.OpenGeoPortal.Download.DownloadRequest

    this.imageRequests = new ArrayList<ImageRequest>();
    this.exportRequests = new ArrayList<GeoCommonsExportRequest>();

    for (String requestId: requestIdsArr){
      try {
        DownloadRequest dlRequest = requestStatusManager.getDownloadRequest(UUID.fromString(requestId));
        if (dlRequest != null){
          this.downloadRequests.add(dlRequest);
        }
      } catch (Exception e){
        //e.printStackTrace();
View Full Code Here

Examples of org.OpenGeoPortal.Download.DownloadRequest

  final static long INTERVAL = 500;//milliseconds
 
  @RequestMapping(method=RequestMethod.GET)
  public void getDownload(@RequestParam("requestId") String requestId, HttpServletResponse response) throws IOException, InterruptedException  {
   
    DownloadRequest layerDownloadRequest = requestStatusManager.getDownloadRequest(UUID.fromString(requestId));
    File downloadPackage = layerDownloadRequest.getDownloadPackage();
    long counter = 0;
    //a final check.  should never get here via the client
    while (!downloadPackage.exists()){
      Thread.sleep(INTERVAL);
      counter += INTERVAL;
View Full Code Here

Examples of org.rssowl.ui.internal.services.DownloadService.DownloadRequest

  @Test
  public void testAttachmentNameGivenFileNotExistNormal() throws Exception {
    File tmpDir = getTmpDir();
    String fileName = "mytest.txt";

    DownloadRequest request = getAttachmentDownloadRequest("http://www.rssowl.org/rssowl2dg/tests/download/test.txt", "text/plain", 23, tmpDir, fileName);
    fService.download(request);

    File download = new File(tmpDir, "mytest.txt");
    assertTrue(download.exists());
    download.delete();
View Full Code Here

Examples of org.rssowl.ui.internal.services.DownloadService.DownloadRequest

  @Test
  public void testAttachmentNameGivenFileNotExistContentDisposition() throws Exception {
    File tmpDir = getTmpDir();
    String fileName = "mytest.txt";

    DownloadRequest request = getAttachmentDownloadRequest("http://www.jtricks.com/download-text", null, 0, tmpDir, fileName);
    fService.download(request);

    File download = new File(tmpDir, fileName);
    assertTrue(download.exists());
    download.delete();
View Full Code Here

Examples of org.rssowl.ui.internal.services.DownloadService.DownloadRequest

   */
  @Test
  public void testAttachmentNoNameGivenFileNotExistNormal() throws Exception {
    File tmpDir = getTmpDir();

    DownloadRequest request = getAttachmentDownloadRequest("http://www.rssowl.org/rssowl2dg/tests/download/test.txt", null, 20, tmpDir, null);
    fService.download(request);

    File download = new File(tmpDir, "test.txt");
    assertTrue(download.exists());
    download.delete();
View Full Code Here

Examples of org.rssowl.ui.internal.services.DownloadService.DownloadRequest

   */
  @Test
  public void testAttachmentNoNameGivenFileNotExistContentDisposition() throws Exception {
    File tmpDir = getTmpDir();

    DownloadRequest request = getAttachmentDownloadRequest("http://www.jtricks.com/download-text", null, 0, tmpDir, null);
    fService.download(request);

    File download = new File(tmpDir, "content.txt");
    assertTrue(download.exists());
    download.delete();
View Full Code Here

Examples of org.rssowl.ui.internal.services.DownloadService.DownloadRequest

    File tmpDir = getTmpDir();
    String fileName = "mytest.txt";

    Date date = new Date(System.currentTimeMillis());

    DownloadRequest request = getAttachmentDownloadRequest("http://www.rssowl.org/rssowl2dg/tests/download/test.txt", null, 0, tmpDir, fileName, date);
    fService.download(request);

    File download = new File(tmpDir, "mytest.txt");
    assertTrue(download.exists());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.