public class DeviceAutomatonImpl extends Object implements LinkComponent.LinkAutomaton
LifeCycleComponent.LifeCycleAutomaton
.LinkComponent.LinkAutomaton
Openable.OpenAutomaton
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedProperty
Closable.CloseAutomaton
ClosedAccessor.ClosedMutator, ClosedAccessor.ClosedProperty
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusProperty
Modifier and Type | Field and Description |
---|---|
protected LinkComponent |
_connectionComponent |
Constructor and Description |
---|
DeviceAutomatonImpl()
Empty constructor, such
LifeCycleComponent.LifeCycleAutomaton cannot do much more
than decline the various LifeCycleStatus states for you. |
DeviceAutomatonImpl(LinkComponent aConnectionComponent)
This constructor uses a
LifeCycleStatus for wrapping it inside
the DeviceAutomatonImpl , making sure of obeying and guarding the
correct LifeCycleStatus 's order of LifeCycleStatus states
for you. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component's connection(s).
|
ConnectionStatus |
getConnectionStatus()
Retrieves the
ConnectionStatus property from the property. |
boolean |
isClosable()
Determines whether the component's connection(s) may get closed.
|
boolean |
isClosed()
Retrieves the is-closed status.
|
boolean |
isOpenable()
Determines whether the component's connection(s) may get opened.
|
boolean |
isOpened()
Retrieves the is-opened property from the opened property.
|
void |
open()
Open the component's connection(s).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closeIn, closeQuietly
protected LinkComponent _connectionComponent
public DeviceAutomatonImpl()
LifeCycleComponent.LifeCycleAutomaton
cannot do much more
than decline the various LifeCycleStatus
states for you.public DeviceAutomatonImpl(LinkComponent aConnectionComponent)
LifeCycleStatus
for wrapping it inside
the DeviceAutomatonImpl
, making sure of obeying and guarding the
correct LifeCycleStatus
's order of LifeCycleStatus
states
for you.aConnectionComponent
- The component to be guarded regarding the
correct declination of the LifeCycleStatus
states.public ConnectionStatus getConnectionStatus()
ConnectionStatusAccessor
ConnectionStatus
property from the property.
Determines in which ConnectionStatus
status a component is in.getConnectionStatus
in interface ConnectionStatusAccessor
ConnectionStatus
property stored by the
property.public boolean isOpenable()
Openable.OpenAutomaton
isOpenable
in interface Openable.OpenAutomaton
Openable.open()
is possible.public void open() throws OpenException
Openable
open
in interface Openable
OpenException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public boolean isOpened()
OpenedAccessor
Openable.open()
or
ConnectionOpenable.open(Object)
.isOpened
in interface OpenedAccessor
public boolean isClosable()
Closable.CloseAutomaton
isClosable
in interface Closable.CloseAutomaton
Closable.close()
is possible.public boolean isClosed()
ClosedAccessor
Closable.close()
.isClosed
in interface ClosedAccessor
public void close()
Closable
CloseException
as
upon close we may have to do things like flushing buffers which can fail
(and would otherwise fail unhandled or even worse unnoticed).Copyright © 2017. All rights reserved.