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 LOGGER = LoggerFactory.getLogger(SleepEvent.class);
22 private long sleepTime;
26 * @param sleepTime time of {@link Thread#sleep(long)} in milliseconds
28 public SleepEvent(long sleepTime) {
29 this.sleepTime = sleepTime;
33 public boolean eventExecuted() {
35 Thread.sleep(sleepTime);
36 LOGGER.debug("Sleeping");
38 } catch (InterruptedException e) {
39 LOGGER.error(e.getMessage(), e);