Example usage for java.lang InterruptedException printStackTrace

List of usage examples for java.lang InterruptedException printStackTrace

Introduction

In this page you can find the example usage for java.lang InterruptedException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:dk.clanie.actor.FirstTestActorImpl.java

protected void process(String method, int arg) {
    Thread currentThread = Thread.currentThread();
    method = method(method);/*from  w  w w  .j  a v a  2s  .c o  m*/
    System.out.println(new Instant() + ": " + method + "(" + arg + ") START in " + currentThread);
    try {
        Thread.sleep(ActorAspectTest.SLEEPTIME);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    System.out.println(new Instant() + ": " + method + "(" + arg + ") DONE in " + currentThread);
}

From source file:io.awacs.demo.TestController.java

public String bis1(String id) {
    try {/*w  ww .  jav  a2 s .  c o  m*/
        Thread.sleep(500);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    bis2();
    return "test " + id;
}

From source file:de.albionco.maintenance.bungee.EnableRunnable.java

@Override
public void run() {
    int loops = parent.getCountdown();
    ProxyServer.getInstance().broadcast(Messages.colour(format(parent.getCountdownMessage(), loops)));
    try {//  ww  w  .  j  av a  2 s. com
        Thread.sleep(1000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    for (int i = loops - 1; i > 0; i--) {
        if (parent.getAlertTimes().contains(i)) {
            ProxyServer.getInstance().broadcast(Messages.colour(format(parent.getCountdownMessage(), i)));
        }
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        if (i == 1) {
            parent.kick(null);
            parent.setEnabled(true);
            sender.sendMessage(MAINTENANCE_ENABLED);
        }
    }
}

From source file:gov.nih.nci.integration.catissue.CaTissueConsentClientIntegrationTest.java

/**
 * Test for RegisterConsent//from www .  j a  va  2  s. c o m
 */
@Test
public void registerConsents() {
    caTissueParticipantClient.registerParticipant(getParticipantXMLStr());
    try {
        //wait for scg to be created
        Thread.sleep(5000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    caTissueSpecimenClient.createSpecimens(getSpecimenXMLStr());
    final ServiceInvocationResult svc = caTissueConsentClient.registerConsents(getRegisterConsentXMLStr());

    if (svc.isDataChanged() && svc.getInvocationException() != null) {
        caTissueConsentClient.rollbackConsents(svc.getOriginalData().toString());
    }
}

From source file:com.heartbuffer.pipette.input.FileInput.java

@Override
public void handle(String line) {
    try {/*from  ww  w  .j a v a2s.c  om*/
        outputQueue.put(line);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}

From source file:de.albionco.maintenance.bukkit.EnableRunnable.java

@Override
public void run() {
    int loops = parent.getCountdown();
    Bukkit.getServer().broadcastMessage(Messages.colour(format(parent.getCountdownMessage(), loops)));
    try {/*from   w  w w.j  a v  a  2s  .c  o  m*/
        Thread.sleep(1000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    for (int i = loops - 1; i > 0; i--) {
        if (parent.getAlertTimes().contains(i)) {
            Bukkit.getServer().broadcastMessage(Messages.colour(format(parent.getCountdownMessage(), i)));
        }
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        if (i == 1) {
            parent.kick(null);
            parent.setMaintenanceEnabled(true);
            sender.sendMessage(MAINTENANCE_ENABLED);
        }
    }
    parent.setTaskId(-1);
}

From source file:com.mmj.app.web.controller.comet.CometController.java

@RequestMapping(value = "/comet/connect", headers = "accept=*/*", produces = "application/json", method = RequestMethod.POST)
@ResponseBody/*ww  w  . j  a va 2 s  . c  o  m*/
public DeferredResult<String> connect() {
    DeferredResult<String> deferredResult = new DeferredResult<String>();
    ConnectVO connectVO = new ConnectVO("62", true, "/meta/connect");
    deferredResult.setResult(new Gson().toJson(Arrays.asList(connectVO)));
    try {
        Thread.sleep(30000);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
    return deferredResult;
}

From source file:com.yawen.Fetcher.IdleConnectionMonitorThread.java

@Override
public void run() {
    try {/*  w w w  .  j  av a  2  s  .co m*/
        while (!shutdown) {
            synchronized (this) {
                wait(5000);
                // 
                connMgr.closeExpiredConnections();
                // 30
                connMgr.closeIdleConnections(30, TimeUnit.SECONDS);
            }
        }
    } catch (InterruptedException ignored) {
        // terminate
        ignored.printStackTrace();
    }
}

From source file:cc.pp.analyzer.paoding.dictionary.support.detection.Detector.java

private void sleep() {
    try {/*from ww w.ja  va 2 s . co m*/
        Thread.sleep(interval);
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}

From source file:com.wabacus.system.dataimport.queue.UploadFilesQueue.java

public Map<List<DataImportItem>, Map<File, FileItem>> getUploadFile() {
    synchronized (queueInstance) {
        while (queueInstance.size() == 0) {
            try {
                queueInstance.wait();/*  ww  w.j  a  v  a2s  . c  o  m*/
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        return queueInstance.remove(0);
    }
}