001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.apache.hadoop.yarn.api.records;
020
021import org.apache.hadoop.classification.InterfaceAudience.Public;
022import org.apache.hadoop.classification.InterfaceStability.Evolving;
023
024/**
025 * <p><code>URL</code> represents a serializable {@link java.net.URL}.</p>
026 */
027@Public
028@Evolving
029public interface URL {
030  
031  /**
032   * Get the scheme of the URL.
033   * @return scheme of the URL
034   */
035  @Public
036  @Evolving
037  public abstract String getScheme();
038  
039  /**
040   * Set the scheme of the URL
041   * @param scheme scheme of the URL
042   */
043  @Public
044  @Evolving
045  public abstract void setScheme(String scheme);
046
047  /**
048   * Get the host of the URL.
049   * @return host of the URL
050   */
051  @Public
052  @Evolving
053  public abstract String getHost();
054  
055  /**
056   * Set the host of the URL.
057   * @param host host of the URL
058   */
059  @Public
060  @Evolving
061  public abstract void setHost(String host);
062
063  /**
064   * Get the port of the URL.
065   * @return port of the URL
066   */
067  @Public
068  @Evolving
069  public abstract int getPort();
070  
071  /**
072   * Set the port of the URL
073   * @param port port of the URL
074   */
075  @Public
076  @Evolving
077  public abstract void setPort(int port);
078
079  /**
080   * Get the file of the URL.
081   * @return file of the URL
082   */
083  @Public
084  @Evolving
085  public abstract String getFile();
086  
087  /**
088   * Set the file of the URL.
089   * @param file file of the URL
090   */
091  @Public
092  @Evolving
093  public abstract void setFile(String file);
094}