@Beta public abstract class ClientActorBehavior<T extends BackendInfo> extends AbstractClientActorBehavior<C> implements org.opendaylight.yangtools.concepts.Identifiable<ClientIdentifier>
AbstractClientActor
.Modifier and Type | Class and Description |
---|---|
protected static interface |
ClientActorBehavior.ConnectionConnectCohort
Connection reconnect cohort, driven by this class.
|
Modifier | Constructor and Description |
---|---|
protected |
ClientActorBehavior(ClientActorContext context,
BackendInfoResolver<T> resolver) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract ClientActorBehavior.ConnectionConnectCohort |
connectionUp(ConnectedClientConnection<T> newConn)
Callback invoked when a new connection has been established.
|
AbstractClientConnection<T> |
getConnection(Long shard)
Get a connection to a shard.
|
ClientIdentifier |
getIdentifier() |
protected abstract void |
haltClient(Throwable cause)
Halt And Catch Fire.
|
protected abstract ClientActorBehavior<T> |
onCommand(Object command)
Override this method to handle any command which is not handled by the base behavior.
|
protected BackendInfoResolver<T> |
resolver()
Override this method to provide a backend resolver instance.
|
context, persistenceId, self
protected ClientActorBehavior(@Nonnull ClientActorContext context, @Nonnull BackendInfoResolver<T> resolver)
@Nonnull public final ClientIdentifier getIdentifier()
getIdentifier
in interface org.opendaylight.yangtools.concepts.Identifiable<ClientIdentifier>
public void close()
close
in interface AutoCloseable
close
in class AbstractClientActorBehavior<ClientActorContext>
public final AbstractClientConnection<T> getConnection(Long shard)
shard
- Shard cookieInversibleLockException
- if the shard is being reconnectedprotected abstract void haltClient(@Nonnull Throwable cause)
cause
- Failure cause@Nullable protected abstract ClientActorBehavior<T> onCommand(@Nonnull Object command)
command
- the command to process@Nonnull protected final BackendInfoResolver<T> resolver()
@Nonnull protected abstract ClientActorBehavior.ConnectionConnectCohort connectionUp(@Nonnull ConnectedClientConnection<T> newConn)
newConn
- New connectionCopyright © 2019 OpenDaylight. All rights reserved.