*/
package org.opendaylight.controller.cluster.access.client;
+import akka.actor.ActorRef;
import com.google.common.annotations.Beta;
+import java.util.Map.Entry;
import java.util.Optional;
-import org.opendaylight.controller.cluster.access.concepts.ResponseEnvelope;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.opendaylight.controller.cluster.access.concepts.Request;
+import org.opendaylight.controller.cluster.access.concepts.RequestEnvelope;
@Beta
public final class ConnectingClientConnection<T extends BackendInfo> extends AbstractClientConnection<T> {
- private static final Logger LOG = LoggerFactory.getLogger(ConnectingClientConnection.class);
-
// Initial state, never instantiated externally
ConnectingClientConnection(final ClientActorContext context, final Long cookie) {
super(context, cookie);
}
@Override
- void receiveResponse(final ResponseEnvelope<?> envelope) {
- LOG.warn("Initial connection {} ignoring response {}", this, envelope);
+ ClientActorBehavior<T> reconnectConnection(final ClientActorBehavior<T> current) {
+ throw new UnsupportedOperationException("Attempted to reconnect a connecting connection");
}
@Override
- ClientActorBehavior<T> reconnectConnection(final ClientActorBehavior<T> current) {
- throw new UnsupportedOperationException("Attempted to reconnect a connecting connection");
+ Entry<ActorRef, RequestEnvelope> prepareForTransmit(final Request<?, ?> req) {
+ // This is guarded by remoteMaxMessages() == 0
+ throw new UnsupportedOperationException("Attempted to transmit on a connecting connection");
+ }
+
+ @Override
+ int remoteMaxMessages() {
+ return 0;
}
}