diff options
author | CNlucius <lukai1@huawei.com> | 2016-09-13 11:40:12 +0800 |
---|---|---|
committer | CNlucius <lukai1@huawei.com> | 2016-09-13 11:41:53 +0800 |
commit | b731e2f1dd0972409b136aebc7b463dd72c9cfad (patch) | |
tree | 5107d7d80c19ad8076c2c97c2b5ef8d1cf3ab903 /framework/src/onos/core/common/src/main/java/org/onosproject/codec/impl/CriterionCodec.java | |
parent | ee93993458266114c29271a481ef9ce7ce621b2a (diff) |
ONOSFW-171
O/S-SFC-ONOS scenario documentation
Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365
Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'framework/src/onos/core/common/src/main/java/org/onosproject/codec/impl/CriterionCodec.java')
-rw-r--r-- | framework/src/onos/core/common/src/main/java/org/onosproject/codec/impl/CriterionCodec.java | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/framework/src/onos/core/common/src/main/java/org/onosproject/codec/impl/CriterionCodec.java b/framework/src/onos/core/common/src/main/java/org/onosproject/codec/impl/CriterionCodec.java deleted file mode 100644 index 975503bb..00000000 --- a/framework/src/onos/core/common/src/main/java/org/onosproject/codec/impl/CriterionCodec.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2015 Open Networking Laboratory - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.onosproject.codec.impl; - -import org.onosproject.codec.CodecContext; -import org.onosproject.codec.JsonCodec; -import org.onosproject.net.flow.criteria.Criterion; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.databind.node.ObjectNode; - -/** - * Criterion codec. - */ -public final class CriterionCodec extends JsonCodec<Criterion> { - - protected static final Logger log = - LoggerFactory.getLogger(CriterionCodec.class); - - protected static final String TYPE = "type"; - protected static final String ETH_TYPE = "ethType"; - protected static final String MAC = "mac"; - protected static final String PORT = "port"; - protected static final String METADATA = "metadata"; - - protected static final String VLAN_ID = "vlanId"; - protected static final String PRIORITY = "priority"; - protected static final String IP_DSCP = "ipDscp"; - protected static final String IP_ECN = "ipEcn"; - protected static final String PROTOCOL = "protocol"; - protected static final String IP = "ip"; - protected static final String TCP_PORT = "tcpPort"; - protected static final String UDP_PORT = "udpPort"; - protected static final String SCTP_PORT = "sctpPort"; - protected static final String ICMP_TYPE = "icmpType"; - protected static final String ICMP_CODE = "icmpCode"; - protected static final String FLOW_LABEL = "flowLabel"; - protected static final String ICMPV6_TYPE = "icmpv6Type"; - protected static final String ICMPV6_CODE = "icmpv6Code"; - protected static final String TARGET_ADDRESS = "targetAddress"; - protected static final String LABEL = "label"; - protected static final String EXT_HDR_FLAGS = "exthdrFlags"; - protected static final String LAMBDA = "lambda"; - protected static final String GRID_TYPE = "gridType"; - protected static final String CHANNEL_SPACING = "channelSpacing"; - protected static final String SPACING_MULIPLIER = "spacingMultiplier"; - protected static final String SLOT_GRANULARITY = "slotGranularity"; - protected static final String OCH_SIGNAL_ID = "ochSignalId"; - protected static final String TUNNEL_ID = "tunnelId"; - protected static final String OCH_SIGNAL_TYPE = "ochSignalType"; - protected static final String ODU_SIGNAL_ID = "oduSignalId"; - protected static final String TRIBUTARY_PORT_NUMBER = "tributaryPortNumber"; - protected static final String TRIBUTARY_SLOT_LEN = "tributarySlotLen"; - protected static final String TRIBUTARY_SLOT_BITMAP = "tributarySlotBitmap"; - protected static final String ODU_SIGNAL_TYPE = "oduSignalType"; - - @Override - public ObjectNode encode(Criterion criterion, CodecContext context) { - EncodeCriterionCodecHelper encoder = new EncodeCriterionCodecHelper(criterion, context); - return encoder.encode(); - } - - @Override - public Criterion decode(ObjectNode json, CodecContext context) { - DecodeCriterionCodecHelper decoder = new DecodeCriterionCodecHelper(json); - return decoder.decode(); - } -} |