* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.applications.frm.util;
import java.lang.management.ManagementFactory;
private static String JMX_OBJECT_SHARD_STATUS = "";
private FrmUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
public static NodeId getNodeIdFromNodeIdentifier(final InstanceIdentifier<FlowCapableNode> nodeIdent) {
}
return leader;
}
-}
\ No newline at end of file
+}
* Helpers for flow lookups in {@link FlowCapableNode}.
*/
public final class FlowCapableNodeLookups {
-
private static final Logger LOG = LoggerFactory.getLogger(FlowCapableNodeLookups.class);
private FlowCapableNodeLookups() {
- throw new IllegalAccessError("non instantiable util class");
+ // Hidden on purpose
}
@NonNull
* Util methods for {@link com.google.common.util.concurrent.ListenableFuture} chaining.
*/
public final class FxChainUtil {
-
private static final Logger LOG = LoggerFactory.getLogger(FxChainUtil.class);
private FxChainUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
-
public static FutureCallback<RpcResult<Void>> logResultCallback(final NodeId nodeId, final String prefix) {
return new FutureCallback<>() {
@Override
* Basic {@link DataTreeModification} related tools.
*/
public final class ModificationUtil {
-
private ModificationUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
public static String nodeIdValue(DataTreeModification<Node> modification) {
final NodeId nodeId = nodeId(modification);
-
- if (nodeId == null) {
- return null;
- }
-
- return nodeId.getValue();
+ return nodeId == null ? null : nodeId.getValue();
}
public static NodeId nodeId(DataTreeModification<Node> modification) {
*/
public final class PathUtil {
private PathUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
public static NodeId digNodeId(final InstanceIdentifier<?> nodeIdent) {
* Util methods for group reconcil task (future chaining, transforms).
*/
public final class ReconcileUtil {
-
private static final Logger LOG = LoggerFactory.getLogger(ReconcileUtil.class);
private ReconcileUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
/**
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder;
public final class FlowCapableNodeMapping {
-
private FlowCapableNodeMapping() {
- throw new UnsupportedOperationException("Utility class.");
+ // Hidden on purpose
}
public static NodeKey getNodeKey(final NodeRef ref) {
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowjava.protocol.impl.core;
import java.net.InetSocketAddress;
* @author michal.polkorab
*/
public final class UdpConnectionMap {
-
private static Map<InetSocketAddress, MessageConsumer> connectionMap = new ConcurrentHashMap<>();
private UdpConnectionMap() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
*/
public final class ActionDeserializerInitializer {
private ActionDeserializerInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
*/
public final class AdditionalMessageDeserializerInitializer {
private AdditionalMessageDeserializerInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowjava.protocol.impl.deserialization;
import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
* @author michal.polkorab
*/
public final class InstructionDeserializerInitializer {
-
private InstructionDeserializerInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* @author michal.polkorab
*/
public final class MatchEntryDeserializerInitializer {
-
private MatchEntryDeserializerInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* @author michal.polkorab
*/
public final class MessageDeserializerInitializer {
-
private MessageDeserializerInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* @author giuseppex.petralia@intel.com
*/
public final class TypeToClassMapInitializer {
-
private TypeToClassMapInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* @author michal.polkorab
*/
public final class OxmDeserializerHelper {
-
private OxmDeserializerHelper() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetVlanPcpCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetVlanVidCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.StripVlanCase;
-//import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Group;
/**
* Initializes serializer registry with action serializers.
* @author michal.polkorab
*/
public final class ActionsInitializer {
-
private ActionsInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
*/
public final class AdditionalMessageFactoryInitializer {
private AdditionalMessageFactoryInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
*/
public final class InstructionsInitializer {
private InstructionsInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* @author michal.polkorab
*/
public final class MatchEntriesInitializer {
-
private MatchEntriesInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* @author michal.polkorab
*/
public final class MessageFactoryInitializer {
-
private MessageFactoryInitializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
private static final Logger LOG = LoggerFactory.getLogger(ListDeserializer.class);
private ListDeserializer() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* OFP related constants.
*/
public final class OFConstants {
-
- private OFConstants() {
- throw new UnsupportedOperationException("OF plugin Constants holder class");
- }
-
/** enum ofp_port_no, reserved port: process with normal L2/L3 switching. */
public static final short OFPP_NORMAL = (short)0xfffa;
/** enum ofp_port_no, reserved port: all physical ports except input port. */
/** supported version ordered by height (highest version is at the beginning). */
public static final List<Uint8> VERSION_ORDER = List.of(OFP_VERSION_1_3, OFP_VERSION_1_0);
+
+ private OFConstants() {
+ // Hidden on purpose
+ }
}
* without touch OF specification 1.3.2 - a section 7.3.5. Multipart Messages
*/
public final class MultipartRequestInputFactory {
-
private MultipartRequestInputFactory() {
- throw new UnsupportedOperationException("Factory class");
+ // Hidden on purpose
}
/**
import org.slf4j.Logger;
public final class RequestContextUtil {
-
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(RequestContextUtil.class);
private RequestContextUtil() {
- throw new UnsupportedOperationException();
+ // Hidden on purpose
}
-
public static <T> ListenableFuture<RpcResult<T>> closeRequestContextWithRpcError(
final RequestContext<T> requestContext,
final String errorMessage) {
public final class RequestInputUtils {
private RequestInputUtils() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
public static MultipartRequestInputBuilder createMultipartHeader(final MultipartType multipart,
* Utils for gathering statistics.
*/
public final class StatisticsGatheringUtils {
-
private static final String DATE_AND_TIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
private static final Logger LOG = LoggerFactory.getLogger(StatisticsGatheringUtils.class);
private static final String QUEUE2_REQCTX = "QUEUE2REQCTX-";
private StatisticsGatheringUtils() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
static <T extends OfHeader> ListenableFuture<Boolean> gatherStatistics(
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.util;
import com.google.common.base.Function;
* Provides barrier message chaining and factory methods.
*/
public final class BarrierUtil {
-
-
private BarrierUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
-
/**
* Chain a barrier message - regardless of previous result and use given {@link Function} to combine
* original result and barrier result.
* Util class for {@link RpcError}.
*/
public final class ErrorUtil {
-
private ErrorUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
public static String errorsToString(final Collection<RpcError> rpcErrors) {
* Provides flat batch util methods.
*/
public final class FlatBatchUtil {
-
private FlatBatchUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
public static void markBarriersWhereNeeded(final List<BatchPlanStep> batchPlan) {
FlowConvertor.DEFAULT_OFPFF_FLOW_REM);
private FlowCreatorUtil() {
- throw new AssertionError("FlowCreatorUtil is not expected to be instantiated.");
+ // Hidden on purpose
}
public static void setWildcardedFlowMatch(final Uint8 version, final MultipartRequestFlowBuilder flowBuilder) {
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.util;
import com.google.common.annotations.VisibleForTesting;
};
private FlowUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
static <K extends Identifier<V>, V extends Identifiable<K>> Map<K, V> index(final List<V> list) {
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.util;
import static org.opendaylight.openflowplugin.impl.util.AddressNormalizationUtil.normalizeIpv4Arbitrary;
.build();
private MatchNormalizationUtil() {
- throw new RuntimeException("Creating instance of util classes is prohibited");
+ // Hidden on purpose
}
/**
.build()))
.orElse(match);
}
-}
\ No newline at end of file
+}
.build();
private MatchUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
-
public static MatchV10Builder createEmptyV10Match() {
return new MatchV10Builder()
.setDlDst(ZERO_MAC_ADDRESS)
//TODO: Make one register and one unregister method for all services
private MdSalRegistrationUtils() {
- throw new IllegalStateException();
+ // Hidden on purpose
}
/**
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.util;
import com.google.common.annotations.VisibleForTesting;
METER_UPDATE_COMPOSING_TRANSFORM = createComposingFunction();
private MeterUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
/**
import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.SendToController;
public final class PacketInUtil {
-
private PacketInUtil() {
- throw new AssertionError("PacketInUtil is not expected to be instantiated.");
+ // Hidden on purpose
}
/**
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.util;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
* Purpose: utility class providing path and {@link InstanceIdentifier} tools.
*/
public final class PathUtil {
-
private PathUtil() {
- throw new IllegalStateException("This class should not be instantiated.");
+ // Hidden on purpose
}
/**
public static NodeId extractNodeId(final NodeRef input) {
return input.getValue().firstKeyOf(Node.class).getId();
}
-}
\ No newline at end of file
+}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.util;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyAggregateCase;
public final class TranslatorLibraryUtil {
-
-
- private TranslatorLibraryUtil() {
- throw new IllegalStateException("This class should not be instantiated");
- }
-
private static final TranslatorKeyFactory OF_13_TRANSLATOR_KEY_FACTORY =
new TranslatorKeyFactory(OFConstants.OFP_VERSION_1_3);
private static final TranslatorKeyFactory OF_10_TRANSLATOR_KEY_FACTORY =
new TranslatorKeyFactory(OFConstants.OFP_VERSION_1_0);
+ private TranslatorLibraryUtil() {
+ // Hidden on purpose
+ }
+
public static void injectBasicTranslatorLibrary(final TranslatorLibrarian librarian,
final ConvertorExecutor convertorExecutor) {
final TranslatorLibrary basicTranslatorLibrary = new TranslatorLibraryBuilder()
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
public final class ActionExtensionHelper {
-
private ActionExtensionHelper() {
- throw new IllegalAccessError("singleton enforcement");
+ // Hidden on purpose
}
/**
private IpConversionUtil() {
- throw new UnsupportedOperationException("This class should not be instantiated.");
+ // Hidden on purpose
}
public static Iterator<String> splitToParts(final Ipv4Prefix ipv4Prefix) {
* @author michal.polkorab
*/
public final class ClientSslContextFactory {
-
private ClientSslContextFactory() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
// "TLS" - supports some version of TLS
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowjava.protocol.impl.clients;
import java.io.InputStream;
* @author michal.polkorab
*/
public final class ClientSslKeyStore {
-
private static final String KEY_STORE_FILENAME = "/selfSignedSwitch";
private ClientSslKeyStore() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowjava.protocol.impl.clients;
import java.io.InputStream;
* @author michal.polkorab
*/
public final class ClientSslTrustStore {
-
private static final String KEY_STORE_FILENAME = "/selfSignedController";
private ClientSslTrustStore() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* @author michal.polkorab
*/
public final class ScenarioFactory {
-
private ScenarioFactory() {
- throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+ // Hidden on purpose
}
/**
* Created by Martin Bobak mbobak@cisco.com on 8/20/14.
*/
public final class TestProviderTransactionUtil {
-
private static final Logger LOG = LoggerFactory.getLogger(TestProviderTransactionUtil.class);
private TestProviderTransactionUtil() {
- throw new AssertionError("TestProviderTransactionUtil was not meant to be instantiated.");
+ // Hidden on purpose
}
public static <T extends DataObject> T getDataObject(ReadTransaction readOnlyTransaction,