Closable
, Closable.CloseAutomaton
, ClosedAccessor
, ConnectableComponent
, ConnectableComponent.ConnectableAutomaton
, ConnectionStatusAccessor
, OpenedAccessor
AbstractDeviceAutomaton
public abstract class AbstractConnectableAutomaton extends Object implements ConnectableComponent.ConnectableAutomaton
AbstractConnectableAutomaton
implements the very basic
AbstractConnectableAutomaton
functionality.Closable.CloseAutomaton, Closable.CloseBuilder<B extends Closable.CloseBuilder<B>>
ClosedAccessor.ClosedMutator, ClosedAccessor.ClosedProperty
ConnectableComponent.ConnectableAutomaton
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusProperty
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedProperty
Constructor | Description |
---|---|
AbstractConnectableAutomaton() |
Modifier and Type | Method | 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() |
Checks if is openable.
|
boolean |
isOpened() |
Retrieves the is-opened property from the opened property.
|
protected void |
open() |
Open.
|
protected void |
setConnectionStatus(ConnectionStatus aConnectionStatus) |
Sets the
ConnectionStatus property for the property. |
closeIn, closeQuietly, closeUnchecked
isConnectionOpened
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 void close() throws CloseException
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()
Closable.close()
.isClosed
in interface ClosedAccessor
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.protected boolean isOpenable()
Openable.OpenAutomaton.isOpenable()
protected void open() throws OpenException
OpenException
- the open exceptionOpenable.open()
protected void setConnectionStatus(ConnectionStatus aConnectionStatus)
ConnectionStatus
property for the property.aConnectionStatus
- The ConnectionStatus
property to be
stored by the property.Copyright © 2018. All rights reserved.