2 * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.openflowjava.protocol.impl.clients;
11 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory;
15 * Class representing sleep (wait) event.
17 * @author michal.polkorab
19 public class SleepEvent implements ClientEvent {
21 private static final Logger LOG = LoggerFactory.getLogger(SleepEvent.class);
22 private final long sleepTime;
27 * @param sleepTime time of {@link Thread#sleep(long)} in milliseconds
29 public SleepEvent(long sleepTime) {
30 this.sleepTime = sleepTime;
34 public boolean eventExecuted() {
36 Thread.sleep(sleepTime);
37 LOG.debug("Sleeping");
39 } catch (InterruptedException e) {
40 LOG.error("Error {}", e);