026b65ed2d94ba316046602747d3df29af2e0dac
[vtn.git] /
1 /*
2  * Copyright (c) 2014 NEC Corporation
3  * All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this
7  * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.vtn.manager.internal.cluster;
11
12 import org.opendaylight.vtn.manager.VTNException;
13 import org.opendaylight.vtn.manager.flow.action.SetTpSrcAction;
14
15 /**
16  * Implementation of flow action that modifies source port number in
17  * TCP or UDP header.
18  *
19  * <p>
20  *   Although this class is public to other packages, this class does not
21  *   provide any API. Applications other than VTN Manager must not use this
22  *   class.
23  * </p>
24  */
25 public final class SetTpSrcActionImpl extends TpPortActionImpl {
26     /**
27      * Version number for serialization.
28      */
29     private static final long serialVersionUID = 644126347054787614L;
30
31     /**
32      * Construct a new instance.
33      *
34      * @param act  A {@link SetTpSrcAction} instance.
35      * @throws VTNException
36      *    {@code act} contains invalid value.
37      */
38     public SetTpSrcActionImpl(SetTpSrcAction act) throws VTNException {
39         super(act);
40     }
41
42     // FlowActionImpl
43
44     /**
45      * {@inheritDoc}
46      */
47     @Override
48     public SetTpSrcAction getFlowAction() {
49         return new SetTpSrcAction(getPort());
50     }
51 }