001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.rest; 014 015import org.apache.juneau.httppart.*; 016 017/** 018 * Represents the information needed to serialize a response part such as a response header or body. 019 */ 020public class ResponsePartMeta { 021 022 /** 023 * Represents a non-existent meta. 024 */ 025 public static final ResponsePartMeta NULL = new ResponsePartMeta(null, null, null); 026 027 private final HttpPartType partType; 028 private final HttpPartSchema schema; 029 private final HttpPartSerializer serializer; 030 031 /** 032 * Constructor. 033 * 034 * @param partType The part type. 035 * @param schema The part schema. 036 * @param serializer The serializer to use to serialize the part. 037 */ 038 public ResponsePartMeta(HttpPartType partType, HttpPartSchema schema, HttpPartSerializer serializer) { 039 this.partType = partType; 040 this.schema = schema; 041 this.serializer = serializer; 042 } 043 044 /** 045 * Returns the part type. 046 * 047 * @return The part type. 048 */ 049 public HttpPartType getPartType() { 050 return partType; 051 } 052 053 /** 054 * Returns the part schema. 055 * 056 * @return The part schema. 057 */ 058 public HttpPartSchema getSchema() { 059 return schema; 060 } 061 062 /** 063 * Returns the part serializer. 064 * 065 * @return The part serializer. 066 */ 067 public HttpPartSerializer getSerializer() { 068 return serializer; 069 } 070}