2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.filtervalve.cors.jaxb;
11 import static com.google.common.base.Preconditions.checkState;
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlRootElement;
17 public class InitParam {
18 private String paramName;
19 private String paramValue;
20 private boolean initialized;
22 public synchronized void inititialize() {
23 checkState(initialized == false, "Already initialized");
27 @XmlElement(name = "param-name")
28 public String getParamName() {
32 public void setParamName(String paramName) {
33 this.paramName = paramName;
36 @XmlElement(name = "param-value")
37 public String getParamValue() {
41 public void setParamValue(String paramValue) {
42 this.paramValue = paramValue;
45 public boolean isInitialized() {
50 public String toString() {
51 return "{" + paramName + '=' + paramValue + "}";