public class DeviceAutomatonImpl extends Object implements DeviceComponent.DeviceAutomaton
LifeCycleComponent.LifeCycleAutomaton
.DeviceComponent.DeviceAutomaton
Openable.OpenAutomaton
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedProperty
Closable.CloseAutomaton
ClosedAccessor.ClosedMutator, ClosedAccessor.ClosedProperty
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusProperty
Modifier and Type | Field and Description |
---|---|
protected DeviceComponent |
_connectionComponent |
Constructor and Description |
---|
DeviceAutomatonImpl()
Empty constructor, such
LifeCycleComponent.LifeCycleAutomaton cannot do much more
than decline the various LifeCycleStatus states for you. |
DeviceAutomatonImpl(DeviceComponent 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).
|
protected DeviceComponent _connectionComponent
public DeviceAutomatonImpl()
LifeCycleComponent.LifeCycleAutomaton
cannot do much more
than decline the various LifeCycleStatus
states for you.public DeviceAutomatonImpl(DeviceComponent 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()
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()
isOpenable
in interface Openable.OpenAutomaton
Openable.open()
is possible.public void open() throws OpenException
open
in interface Openable
OpenException
- Thrown in case opening or accessing an open line
(connection, junction, link) caused problems.public boolean isOpened()
Openable.open()
or
ConnectionOpenable.open(Object)
.isOpened
in interface OpenedAccessor
public boolean isClosable()
isClosable
in interface Closable.CloseAutomaton
Closable.close()
is possible.public boolean isClosed()
Closable.close()
.isClosed
in interface ClosedAccessor
public void close()
Destroyable.destroy()
method, which must not throw
any exception as well.Copyright © 2015. All rights reserved.