public abstract class AbstractDevice extends Object implements DeviceInterface
Constructor and Description |
---|
AbstractDevice(String key,
DeviceFactoryInterface deviceFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract void |
closeDevice() |
protected DeviceFactoryInterface |
getDeviceFactory() |
String |
getKey() |
boolean |
isOpen() |
public AbstractDevice(String key, DeviceFactoryInterface deviceFactory)
public final String getKey()
getKey
in interface DeviceInterface
public boolean isOpen()
isOpen
in interface DeviceInterface
public final void close()
close
in interface DeviceInterface
close
in interface Closeable
close
in interface AutoCloseable
protected DeviceFactoryInterface getDeviceFactory()
protected abstract void closeDevice() throws RuntimeIOException
RuntimeIOException
Copyright © 2016–2017 mattjlewis. All rights reserved.