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 (the
006 * "License"); you may not use this file except in compliance with the
007 * 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 */
017package org.apache.juneau.http.header;
018
019
020import java.net.*;
021import java.util.function.*;
022
023/**
024 * Represents an HTTP <c>Content-Location</c> header.
025 *
026 * <p>
027 * An alternate location for the returned entity.
028 *
029 * @since 9.2.1
030 */
031public class ContentLocation extends HttpUriHeader {
032
033   public static final String NAME = "Content-Location";
034
035   public ContentLocation(String value) {
036      super(NAME, value);
037   }
038
039   public ContentLocation(URI value) {
040      super(NAME, value);
041   }
042
043   private ContentLocation(Supplier<?> supplier, int lazyMode) {
044      super(NAME, supplier, lazyMode);
045   }
046
047   public static ContentLocation of(String value) {
048      return new ContentLocation(value);
049   }
050
051   public static ContentLocation of(URI value) {
052      return new ContentLocation(value);
053   }
054
055   public static ContentLocation ofLazyWire(Supplier<String> supplier) {
056      return new ContentLocation(supplier, LAZY_WIRE_STRING);
057   }
058
059   public static ContentLocation ofLazyParsed(Supplier<URI> supplier) {
060      return new ContentLocation(supplier, LAZY_URI);
061   }
062}