001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018package org.apache.camel.model.remote;
019
020import javax.xml.bind.annotation.XmlAccessType;
021import javax.xml.bind.annotation.XmlAccessorType;
022import javax.xml.bind.annotation.XmlAttribute;
023import javax.xml.bind.annotation.XmlRootElement;
024
025import org.apache.camel.spi.Metadata;
026
027/**
028 * DNS remote service call configuration
029 */
030@Metadata(label = "eip,routing,remote")
031@XmlRootElement(name = "dnsConfiguration")
032@XmlAccessorType(XmlAccessType.FIELD)
033public class DnsConfigurationDefinition extends ServiceCallConfigurationDefinition {
034
035    @XmlAttribute @Metadata(defaultValue = "_tcp")
036    String proto = "_tcp";
037
038    @XmlAttribute
039    String domain;
040
041    public DnsConfigurationDefinition() {
042    }
043
044    public DnsConfigurationDefinition(ServiceCallDefinition parent) {
045        super(parent);
046    }
047
048    // -------------------------------------------------------------------------
049    // Getter/Setter
050    // -------------------------------------------------------------------------
051
052    public String getProto() {
053        return proto;
054    }
055
056    public void setProto(String proto) {
057        this.proto = proto;
058    }
059
060    public String getDomain() {
061        return domain;
062    }
063
064    public void setDomain(String domain) {
065        this.domain = domain;
066    }
067
068    // -------------------------------------------------------------------------
069    // Fluent API
070    // -------------------------------------------------------------------------
071 
072    /**
073     * The transport protocol of the desired service.
074     */
075    public DnsConfigurationDefinition proto(String proto) {
076        setProto(proto);
077        return this;
078    }
079
080    /**
081     * The domain name;
082     */
083    public DnsConfigurationDefinition domain(String domain) {
084        setDomain(domain);
085        return this;
086    }
087}