public abstract class AbstractSelfDisconnectTransport extends AbstractObserverTransport
| Modifier and Type | Field and Description |
|---|---|
protected AtomicInteger |
connectCount |
protected TransportType |
transportType |
listenerObservers, log| Constructor and Description |
|---|
AbstractSelfDisconnectTransport(TransportType transportType) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
addConnectRef() |
void |
connect(StreamListener listener)
Connect to stream.
|
abstract void |
connectImpl() |
void |
disconnect(StreamListener listener)
Disconnect to stream.
|
abstract void |
disconnectImpl() |
void |
dispose()
Dispose the transport.
|
int |
getTotalConnectRefs() |
boolean |
isConnect()
Check if stream is connected.
|
protected int |
releaseConnectRef() |
removeMessageStreamListener, setMessageStreamListenerprotected AtomicInteger connectCount
protected TransportType transportType
public AbstractSelfDisconnectTransport(TransportType transportType)
protected int addConnectRef()
protected int releaseConnectRef()
public int getTotalConnectRefs()
public void connect(StreamListener listener) throws IOException
StreamTransportconnect in interface StreamTransportconnect in class AbstractObserverTransportlistener - the listenerIOException - if error occurredpublic void disconnect(StreamListener listener) throws IOException
StreamTransportdisconnect in interface StreamTransportdisconnect in class AbstractObserverTransportlistener - the listenerIOException - if error occurredpublic abstract void connectImpl()
throws IOException
IOExceptionpublic abstract void disconnectImpl()
throws IOException
IOExceptionpublic void dispose()
throws IOException
StreamTransportThis methods disconnect from stream and cleans all subscribed listeners.
dispose in interface StreamTransportdispose in class AbstractObserverTransportIOException - if error occurredpublic boolean isConnect()
StreamTransportCopyright © 2000–2025 EPAM Systems. All rights reserved.