public void wake(final WakeOnLanListener wakeOnLanListener) {

        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    wake();
                    if (wakeOnLanListener != null) wakeOnLanListener.onSuccess();
                } catch (IOException e) {
                    if (wakeOnLanListener != null) wakeOnLanListener.onError(e);
                }

            }
        });

        thread.start();
    }
Asynchronous call of the wake method. This will be performed on the background thread
and optionally fire a listener when complete, or when an error occurs

@param wakeOnLanListener - listener to call on result
library/src/main/java/com/stealthcopter/networktools/WakeOnLan.java