import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.Serial;
import java.util.Properties;
public class Configuration {
public abstract static class ConfigurationException extends RuntimeException {
+ @Serial
private static final long serialVersionUID = -7759423506815697761L;
ConfigurationException(final String msg) {
}
public static class ReadException extends ConfigurationException {
+ @Serial
private static final long serialVersionUID = 1661483843463184121L;
ReadException(final String msg, final Exception exc) {
}
public static class MissingException extends ConfigurationException {
+ @Serial
private static final long serialVersionUID = 3406998256398889038L;
private final String key;
*/
package org.opendaylight.netconf.topology.singleton.impl.netconf;
+import java.io.Serial;
import org.opendaylight.yangtools.yang.common.OperationFailedException;
import org.opendaylight.yangtools.yang.common.RpcError;
public class NetconfServiceFailedException extends OperationFailedException {
+ @Serial
private static final long serialVersionUID = 1L;
public NetconfServiceFailedException(final String message, final RpcError... errors) {
*/
package org.opendaylight.netconf.topology.singleton.impl.utils;
+import java.io.Serial;
import org.opendaylight.mdsal.dom.api.DOMActionException;
/**
* Exception thrown during remote action invocation in Odl-Cluster environment.
*/
public class ClusteringActionException extends DOMActionException {
+ @Serial
private static final long serialVersionUID = 1L;
/**
*/
package org.opendaylight.netconf.topology.singleton.impl.utils;
+import java.io.Serial;
import org.opendaylight.mdsal.dom.api.DOMRpcException;
public class ClusteringRpcException extends DOMRpcException {
+ @Serial
private static final long serialVersionUID = 1L;
public ClusteringRpcException(final String message) {
package org.opendaylight.netconf.topology.singleton.messages;
import akka.actor.ActorRef;
+import java.io.Serial;
import java.io.Serializable;
/**
* with reply 'RegisterMountPoint' which includes needed parameters.
*/
public class AskForMasterMountPoint implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
private final ActorRef slaveActorRef;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.Serial;
import org.opendaylight.controller.cluster.datastore.node.utils.stream.SerializationUtils;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
* serialization when remote action is invoked.
*/
public class ContainerNodeMessage implements Externalizable {
+ @Serial
private static final long serialVersionUID = 1L;
private ContainerNode node;
package org.opendaylight.netconf.topology.singleton.messages;
+import java.io.Serial;
import java.io.Serializable;
/**
* when this message is received by master, operational data-store is changed.
*/
public class MasterActorDataInitialized implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.Serial;
import org.opendaylight.controller.cluster.datastore.node.utils.stream.SerializationUtils;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
* Message which holds node data, prepared to sending between remote hosts with serialization.
*/
public class NormalizedNodeMessage implements Externalizable {
+ @Serial
private static final long serialVersionUID = 1L;
private YangInstanceIdentifier identifier;
package org.opendaylight.netconf.topology.singleton.messages;
import akka.actor.ActorRef;
+import java.io.Serial;
/**
* Exception reply indicating the recipient is not the master.
* @author Thomas Pantelis
*/
public class NotMasterException extends Exception {
+ @Serial
private static final long serialVersionUID = 1L;
public NotMasterException(final ActorRef recipient) {
package org.opendaylight.netconf.topology.singleton.messages;
import akka.actor.ActorRef;
+import java.io.Serial;
import java.io.Serializable;
import java.util.List;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
* Master sends the message to slave with necessary parameters for creating slave mount point.
*/
public class RegisterMountPoint implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
private final List<SourceIdentifier> allSourceIdentifiers;
import java.io.InvalidObjectException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.Serial;
import java.io.Serializable;
import java.util.List;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
public class SchemaPathMessage implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
@SuppressFBWarnings("SE_BAD_FIELD")
}
private static class Proxy implements Externalizable {
+ @Serial
private static final long serialVersionUID = 2L;
private SchemaPathMessage schemaPathMessage;
package org.opendaylight.netconf.topology.singleton.messages;
+import java.io.Serial;
import java.io.Serializable;
/**
* close method). Message must be sended before slave actor is poisoned.
*/
public class UnregisterSlaveMountPoint implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
package org.opendaylight.netconf.topology.singleton.messages;
+import java.io.Serial;
import java.io.Serializable;
import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
* Master responds with resolved schema source.
*/
public class YangTextSchemaSourceRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
private final SourceIdentifier sourceIdentifier;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.Serial;
import java.io.Serializable;
import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
* invoked.
*/
public class InvokeActionMessage implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
private final SchemaPathMessage schemaPathMessage;
}
private static class Proxy implements Externalizable {
+ @Serial
private static final long serialVersionUID = 2L;
private InvokeActionMessage invokeActionMessage;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
* remote hosts with serialization when action operation is invoked.
*/
public class InvokeActionMessageReply implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
@SuppressFBWarnings("SE_BAD_FIELD")
}
private static class Proxy implements Externalizable {
+ @Serial
private static final long serialVersionUID = 2L;
private InvokeActionMessageReply invokeActionMessageReply;
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import java.io.Serializable;
public class CommitRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.netconf.api.EffectiveOperation;
import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
public class CreateEditConfigRequest extends EditConfigRequest {
+ @Serial
private static final long serialVersionUID = 1L;
public CreateEditConfigRequest(LogicalDatastoreType store, NormalizedNodeMessage data,
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import java.io.Serializable;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class DeleteEditConfigRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
private final LogicalDatastoreType store;
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import java.io.Serializable;
public class DiscardChangesRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import java.io.Serializable;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.netconf.api.EffectiveOperation;
import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
public class EditConfigRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
private final LogicalDatastoreType store;
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import org.opendaylight.netconf.topology.singleton.messages.transactions.ReadActorMessage;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class GetConfigRequest implements ReadActorMessage {
+ @Serial
private static final long serialVersionUID = 1L;
private final YangInstanceIdentifier path;
package org.opendaylight.netconf.topology.singleton.messages.netconf;
import com.google.common.collect.ImmutableList;
+import java.io.Serial;
import java.util.List;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class GetConfigWithFieldsRequest extends GetConfigRequest {
+ @Serial
private static final long serialVersionUID = 1L;
private final List<YangInstanceIdentifier> fields;
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import org.opendaylight.netconf.topology.singleton.messages.transactions.ReadActorMessage;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class GetRequest implements ReadActorMessage {
+ @Serial
private static final long serialVersionUID = 1L;
private final YangInstanceIdentifier path;
package org.opendaylight.netconf.topology.singleton.messages.netconf;
import com.google.common.collect.ImmutableList;
+import java.io.Serial;
import java.util.List;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class GetWithFieldsRequest extends GetRequest {
+ @Serial
private static final long serialVersionUID = 1L;
private final List<YangInstanceIdentifier> fields;
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import java.io.Serializable;
public class LockRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.netconf.api.EffectiveOperation;
import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
public class MergeEditConfigRequest extends EditConfigRequest {
+ @Serial
private static final long serialVersionUID = 1L;
public MergeEditConfigRequest(LogicalDatastoreType store, NormalizedNodeMessage data,
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import java.io.Serializable;
public class NetconfDataTreeServiceRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import java.io.Serializable;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class RemoveEditConfigRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
private final LogicalDatastoreType store;
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.netconf.api.EffectiveOperation;
import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
public class ReplaceEditConfigRequest extends EditConfigRequest {
+ @Serial
private static final long serialVersionUID = 1L;
public ReplaceEditConfigRequest(final LogicalDatastoreType store, final NormalizedNodeMessage data,
*/
package org.opendaylight.netconf.topology.singleton.messages.netconf;
+import java.io.Serial;
import java.io.Serializable;
public class UnlockRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.Serial;
import java.io.Serializable;
import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
public class InvokeRpcMessage implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
private final SchemaPathMessage schemaPathMessage;
}
private static class Proxy implements Externalizable {
+ @Serial
private static final long serialVersionUID = 2L;
private InvokeRpcMessage invokeRpcMessage;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.Serial;
import java.io.Serializable;
import java.util.Collection;
import java.util.LinkedList;
import org.opendaylight.yangtools.yang.common.RpcError;
public class InvokeRpcMessageReply implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
@SuppressFBWarnings("SE_BAD_FIELD")
}
private static class Proxy implements Externalizable {
+ @Serial
private static final long serialVersionUID = 2L;
private InvokeRpcMessageReply invokeRpcMessageReply;
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
+
public class CancelRequest implements WriteActorMessage {
+ @Serial
private static final long serialVersionUID = 1L;
}
*/
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class DeleteRequest implements WriteActorMessage {
+ @Serial
private static final long serialVersionUID = 1L;
private final LogicalDatastoreType store;
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import java.io.Serializable;
/**
* Message is sended when read result do not present any value.
*/
public class EmptyReadResponse implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import java.io.Serializable;
/**
* Message is sended when RPC result does not exist or is empty.
*/
public class EmptyResultResponse implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
*/
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class ExistsRequest implements ReadActorMessage {
+ @Serial
private static final long serialVersionUID = 1L;
private final LogicalDatastoreType store;
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
public class MergeRequest implements WriteActorMessage {
+ @Serial
private static final long serialVersionUID = 1L;
private final NormalizedNodeMessage data;
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import java.io.Serializable;
public class NewReadTransactionRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import java.io.Serializable;
public class NewReadWriteTransactionRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import java.io.Serializable;
public class NewWriteTransactionRequest implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
}
*/
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
public class PutRequest implements WriteActorMessage {
+ @Serial
private static final long serialVersionUID = 1L;
private final LogicalDatastoreType store;
*/
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class ReadRequest implements ReadActorMessage {
+ @Serial
private static final long serialVersionUID = 1L;
private final LogicalDatastoreType store;
package org.opendaylight.netconf.topology.singleton.messages.transactions;
+import java.io.Serial;
+
public class SubmitRequest implements WriteActorMessage {
+ @Serial
private static final long serialVersionUID = 1L;
}
import static java.util.Objects.requireNonNull;
import com.google.common.annotations.Beta;
+import java.io.Serial;
import org.opendaylight.netconf.shaded.sshd.common.SshException;
/**
*/
@Beta
public class AuthenticationFailedException extends SshException {
+ @Serial
private static final long serialVersionUID = 1L;
public AuthenticationFailedException(final String message) {
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.SettableFuture;
+import java.io.Serial;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
* A dedicated exception to indicate when we fail to setup an {@link EffectiveModelContext}.
*/
public static final class EmptySchemaContextException extends Exception {
+ @Serial
private static final long serialVersionUID = 1L;
public EmptySchemaContextException(final String message) {
import com.google.common.annotations.Beta;
import com.google.common.util.concurrent.FluentFuture;
+import java.io.Serial;
import org.opendaylight.mdsal.dom.api.DOMDataBroker;
import org.opendaylight.mdsal.dom.api.DOMDataBrokerExtension;
import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
* failed.
*/
class ValidationFailedException extends OperationFailedException {
+ @Serial
private static final long serialVersionUID = 1L;
public ValidationFailedException(final String message, final Throwable cause) {
import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions;
+import java.io.Serial;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Deque;
}
private static class ValidationException extends Exception {
+ @Serial
private static final long serialVersionUID = 1L;
ValidationException(final XmlElement parent, final XmlElement child) {
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import java.io.IOException;
+import java.io.Serial;
import java.util.Collection;
import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
@Override
public ListenableFuture<DOMRpcResult> invokeRpc(final QName type, final ContainerNode input) {
return Futures.immediateFailedFuture(new DOMRpcException("rpc invocation not implemented yet") {
+ @Serial
private static final long serialVersionUID = 1L;
});
}
import static org.opendaylight.netconf.api.xml.XmlNetconfConstants.RPC_REPLY_KEY;
+import java.io.Serial;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public static final String ERROR_MESSAGE = "error-message";
public static final String ERROR_INFO = "error-info";
+ @Serial
private static final long serialVersionUID = 1L;
private static final Logger LOG = LoggerFactory.getLogger(DocumentedException.class);
private static final DocumentBuilderFactory BUILDER_FACTORY;
package org.opendaylight.netconf.api;
+import java.io.Serial;
+
/**
* This exception is thrown by
* {@link NetconfSessionListener#onMessage} to indicate fatal
* communication problem after which the session should be closed.
*/
public class NetconfDeserializerException extends Exception {
+ @Serial
private static final long serialVersionUID = 1L;
public NetconfDeserializerException(final String message) {
package org.opendaylight.netconf.api;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import java.io.Serial;
import java.util.Map;
import org.opendaylight.yangtools.yang.common.ErrorSeverity;
import org.opendaylight.yangtools.yang.common.ErrorTag;
* Checked exception to communicate an error that needs to be sent to the netconf client.
*/
public class NetconfDocumentedException extends DocumentedException {
+ @Serial
private static final long serialVersionUID = 1L;
public NetconfDocumentedException(final String message) {
*/
package org.opendaylight.netconf.api.xml;
+import java.io.Serial;
import java.util.Map;
import org.opendaylight.netconf.api.DocumentedException;
import org.opendaylight.yangtools.yang.common.ErrorSeverity;
import org.opendaylight.yangtools.yang.common.ErrorType;
public class MissingNameSpaceException extends DocumentedException {
+ @Serial
private static final long serialVersionUID = 1L;
public MissingNameSpaceException(final String message, final ErrorType errorType, final ErrorTag errorTag,
*/
package org.opendaylight.netconf.api.xml;
+import java.io.Serial;
import java.util.Map;
import org.opendaylight.netconf.api.DocumentedException;
import org.opendaylight.yangtools.yang.common.ErrorSeverity;
import org.opendaylight.yangtools.yang.common.ErrorType;
public class UnexpectedElementException extends DocumentedException {
+ @Serial
private static final long serialVersionUID = 1L;
public UnexpectedElementException(final String message, final ErrorType errorType, final ErrorTag errorTag,
*/
package org.opendaylight.netconf.api.xml;
+import java.io.Serial;
import java.util.Map;
import org.opendaylight.netconf.api.DocumentedException;
import org.opendaylight.yangtools.yang.common.ErrorSeverity;
import org.opendaylight.yangtools.yang.common.ErrorType;
public class UnexpectedNamespaceException extends DocumentedException {
+ @Serial
private static final long serialVersionUID = 1L;
public UnexpectedNamespaceException(final String format, final Object... args) {
import static java.util.Objects.requireNonNull;
+import java.io.Serial;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
* @author Thomas Pantelis
*/
public class RestconfDocumentedException extends WebApplicationException {
+ @Serial
private static final long serialVersionUID = 2L;
private final List<RestconfError> errors;
import static java.util.Objects.requireNonNull;
+import java.io.Serial;
import java.io.Serializable;
import java.util.Locale;
import org.opendaylight.yangtools.yang.common.ErrorTag;
* See also <a href="https://tools.ietf.org/html/draft-bierman-netconf-restconf-02">RESTCONF</a>.
*/
public class RestconfError implements Serializable {
+ @Serial
private static final long serialVersionUID = 1L;
private final ErrorType errorType;
import com.google.common.annotations.VisibleForTesting;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import java.io.Serial;
import java.util.concurrent.ScheduledExecutorService;
import javax.inject.Inject;
import javax.inject.Singleton;
*/
@Singleton
public final class WebSocketInitializer extends WebSocketServlet {
+ @Serial
private static final long serialVersionUID = 1L;
@SuppressFBWarnings(value = "SE_BAD_FIELD",