public abstract class AbstractConnectableAutomaton extends Object implements ConnectableComponent.ConnectableAutomaton
AbstractConnectableAutomaton
implements the very basic
AbstractConnectableAutomaton
functionality.ConnectableComponent.ConnectableAutomaton
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedProperty
Closable.CloseAutomaton
ClosedAccessor.ClosedMutator, ClosedAccessor.ClosedProperty
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusProperty
Constructor and Description |
---|
AbstractConnectableAutomaton() |
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.
|
protected boolean |
isOpenable() |
boolean |
isOpened()
Retrieves the is-opened property from the opened property.
|
protected void |
open() |
protected void |
setConnectionStatus(ConnectionStatus aConnectionStatus)
Sets the
ConnectionStatus property for the property. |
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 void close() throws CloseException
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).close
in interface Closable
CloseException
- in case closing or pre-closing (flushing) fails.public boolean isClosed()
ClosedAccessor
Closable.close()
.isClosed
in interface ClosedAccessor
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.protected boolean isOpenable()
Openable.OpenAutomaton.isOpenable()
protected void open() throws OpenException
OpenException
Openable.open()
protected void setConnectionStatus(ConnectionStatus aConnectionStatus)
ConnectionStatus
property for the property.aConnectionStatus
- The ConnectionStatus
property to be
stored by the property.Copyright © 2016. All rights reserved.