| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Header (Apache Juneau 9.0.0)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Header (Apache Juneau 9.0.0)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/juneau/http/annotation/HasQueryAnnotation.Builder.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/juneau/http/annotation/HeaderAnnotation.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/juneau/http/annotation/Header.html" target="_top">Frames</a></li> |
| <li><a href="Header.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Field | </li> |
| <li>Required | </li> |
| <li><a href="#annotation.type.optional.element.summary">Optional</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#annotation.type.element.detail">Element</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.juneau.http.annotation</div> |
| <h2 title="Annotation Type Header" class="title">Annotation Type Header</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Documented.html?is-external=true" title="class or interface in java.lang.annotation">@Documented</a> |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>={<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#PARAMETER" title="class or interface in java.lang.annotation">PARAMETER</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/ElementType.html?is-external=true#FIELD" title="class or interface in java.lang.annotation">FIELD</a>}) |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Retention.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>) |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Inherited.html?is-external=true" title="class or interface in java.lang.annotation">@Inherited</a> |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Repeatable.html?is-external=true" title="class or interface in java.lang.annotation">@Repeatable</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Repeatable.html?is-external=true#value--" title="class or interface in java.lang.annotation">value</a>=<a href="../../../../../org/apache/juneau/http/annotation/HeaderAnnotation.Array.html" title="annotation in org.apache.juneau.http.annotation">HeaderAnnotation.Array.class</a>) |
| <a href="../../../../../org/apache/juneau/annotation/ContextApply.html" title="annotation in org.apache.juneau.annotation">@ContextApply</a>(<a href="../../../../../org/apache/juneau/annotation/ContextApply.html#value--">value</a>=<a href="../../../../../org/apache/juneau/http/annotation/HeaderAnnotation.Applier.html" title="class in org.apache.juneau.http.annotation">HeaderAnnotation.Applier.class</a>) |
| public @interface <a href="../../../../../src-html/org/apache/juneau/http/annotation/Header.html#line.89">Header</a></pre> |
| <div class="block">REST request header annotation. |
| |
| <p> |
| Identifies a POJO to be used as the header of an HTTP request. |
| |
| <p> |
| Can be used in the following locations: |
| <ul> |
| <li>Arguments and argument-types of server-side <ja>@RestOp</ja>-annotated methods. |
| <li>Arguments and argument-types of client-side <ja>@RemoteResource</ja>-annotated interfaces. |
| <li>Methods and return types of server-side and client-side <ja>@Request</ja>-annotated interfaces. |
| </ul> |
| |
| <h5 class='topic'>Arguments and argument-types of server-side @RestOp-annotated methods</h5> |
| <p> |
| Annotation that can be applied to a parameter of a <ja>@RestOp</ja>-annotated method to identify it as a HTTP |
| request header. |
| |
| <h5 class='section'>Example:</h5> |
| <p class='bjava'> |
| <ja>@RestGet</ja> |
| <jk>public void</jk> doGet(<ja>@Header</ja>(<js>"ETag"</js>) UUID <jv>etag</jv>) {...} |
| </p> |
| |
| <p> |
| This is functionally equivalent to the following code... |
| <p class='bjava'> |
| <ja>@RestGet</ja> |
| <jk>public void</jk> doGet(RestRequest <jv>req</jv>, RestResponse <jv>res</jv>) { |
| UUID <jv>etag</jv> = <jv>req</jv>.getHeader(<js>"ETag"</js>).as(UUID.<jk>class</jk>).orElse(<jk>null</jk>); |
| ... |
| } |
| </p> |
| |
| <ul class='seealso'> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-server.jrs.Swagger'>Overview > juneau-rest-server > Swagger</a> |
| <li class='extlink'><a class='doclink' href='https://swagger.io/specification/v2#parameterObject'>Swagger Parameter Object</a> |
| </ul> |
| |
| <h5 class='topic'>Arguments and argument-types of client-side @RemoteResource-annotated interfaces</h5> |
| <p> |
| Annotation applied to Java method arguments of interface proxies to denote that they are serialized as an HTTP |
| header value. |
| |
| <ul class='seealso'> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-client.jrc.Proxies.jrc.Header'>Overview > juneau-rest-client > REST Proxies > @Header</a> |
| </ul> |
| |
| <h5 class='topic'>Methods and return types of server-side and client-side @Request-annotated interfaces</h5> |
| <p> |
| <ul class='seealso'> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-rest-client.jrc.Proxies.jrc.Request'>Overview > juneau-rest-client > REST Proxies > @Request</a> |
| </ul> |
| <p> |
| <ul class='seealso'> |
| <li class='extlink'><a class='doclink' target='_blank' href='https://github.com/apache/juneau/blob/master/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/http/annotation/Header.java'>Source</a> |
| </ul></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="annotation.type.optional.element.summary"> |
| <!-- --> |
| </a> |
| <h3>Optional Element Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> |
| <caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Optional Element and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Header.html#def--">def</a></span></code> |
| <div class="block">Default value for this parameter.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Header.html#name--">name</a></span></code> |
| <div class="block">HTTP header name.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Header.html#on--">on</a></span></code> |
| <div class="block">Dynamically apply this annotation to the specified classes.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Header.html#onClass--">onClass</a></span></code> |
| <div class="block">Dynamically apply this annotation to the specified classes.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Header.html#parser--">parser</a></span></code> |
| <div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart"><code>HttpPartParser</code></a> class used for parsing strings to values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/juneau/annotation/Schema.html" title="annotation in org.apache.juneau.annotation">Schema</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Header.html#schema--">schema</a></span></code> |
| <div class="block"><mk>schema</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#parameterObject'>Swagger Parameter Object</a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Header.html#serializer--">serializer</a></span></code> |
| <div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> class used for serializing values to strings.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/juneau/http/annotation/Header.html#value--">value</a></span></code> |
| <div class="block">A synonym for <a href="../../../../../org/apache/juneau/http/annotation/Header.html#name--"><code>name()</code></a>.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="annotation.type.element.detail"> |
| <!-- --> |
| </a> |
| <h3>Element Detail</h3> |
| <a name="def--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>def</h4> |
| <pre>public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/http/annotation/Header.html#line.96">def</a></pre> |
| <div class="block">Default value for this parameter.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The annotation value.</dd> |
| </dl> |
| <dl> |
| <dt>Default:</dt> |
| <dd>""</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="name--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>name</h4> |
| <pre>public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/http/annotation/Header.html#line.157">name</a></pre> |
| <div class="block">HTTP header name. |
| <p> |
| A blank value (the default) indicates to reuse the bean property name when used on a request bean property. |
| |
| <p> |
| The value should be either a valid HTTP header name, or <js>"*"</js> to represent multiple name/value pairs |
| |
| <p> |
| A blank value (the default) has the following behavior: |
| <ul class='spaced-list'> |
| <li> |
| If the data type is <c>NameValuePairs</c>, <c>Map</c>, or a bean, |
| then it's the equivalent to <js>"*"</js> which will cause the value to be serialized as name/value pairs. |
| |
| <h5 class='figure'>Examples:</h5> |
| <p class='bjava'> |
| <jc>// When used on a REST method</jc> |
| <ja>@RestPost</ja>(<js>"/addPet"</js>) |
| <jk>public void</jk> addPet(<ja>@Header</ja> JsonMap <jv>allHeaderParameters</jv>) {...} |
| </p> |
| <p class='bjava'> |
| <jc>// When used on a remote method parameter</jc> |
| <ja>@RemoteResource</ja>(path=<js>"/myproxy"</js>) |
| <jk>public interface</jk> MyProxy { |
| |
| <jc>// Equivalent to @Header("*")</jc> |
| <ja>@RemoteGet</ja>(<js>"/mymethod"</js>) |
| String myProxyMethod1(<ja>@Header</ja> Map<String,Object> <jv>allHeaderParameters</jv>); |
| } |
| </p> |
| <p class='bjava'> |
| <jc>// When used on a request bean method</jc> |
| <jk>public interface</jk> MyRequest { |
| |
| <jc>// Equivalent to @Header("*")</jc> |
| <ja>@Header</ja> |
| Map<String,Object> getFoo(); |
| } |
| </p> |
| </li> |
| <li> |
| If used on a request bean method, uses the bean property name. |
| |
| <h5 class='figure'>Example:</h5> |
| <p class='bjava'> |
| <jk>public interface</jk> MyRequest { |
| |
| <jc>// Equivalent to @Header("Foo")</jc> |
| <ja>@Header</ja> |
| <ja>@Beanp</ja>(<js>"Foo"</js>) |
| String getFoo(); |
| } |
| </p> |
| </li> |
| </ul></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The annotation value.</dd> |
| </dl> |
| <dl> |
| <dt>Default:</dt> |
| <dd>""</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="on--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>on</h4> |
| <pre>public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] <a href="../../../../../src-html/org/apache/juneau/http/annotation/Header.html#line.168">on</a></pre> |
| <div class="block">Dynamically apply this annotation to the specified classes. |
| |
| <ul class='seealso'> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.jm.DynamicallyAppliedAnnotations'>Overview > juneau-marshall > Dynamically Applied Annotations</a> |
| </ul></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The annotation value.</dd> |
| </dl> |
| <dl> |
| <dt>Default:</dt> |
| <dd>{}</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="onClass--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onClass</h4> |
| <pre>public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?>[] <a href="../../../../../src-html/org/apache/juneau/http/annotation/Header.html#line.182">onClass</a></pre> |
| <div class="block">Dynamically apply this annotation to the specified classes. |
| |
| <p> |
| Identical to <a href="../../../../../org/apache/juneau/http/annotation/Header.html#on--"><code>on()</code></a> except allows you to specify class objects instead of a strings. |
| |
| <ul class='seealso'> |
| <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-marshall.jm.DynamicallyAppliedAnnotations'>Overview > juneau-marshall > Dynamically Applied Annotations</a> |
| </ul></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The annotation value.</dd> |
| </dl> |
| <dl> |
| <dt>Default:</dt> |
| <dd>{}</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="parser--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>parser</h4> |
| <pre>public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart">HttpPartParser</a>> <a href="../../../../../src-html/org/apache/juneau/http/annotation/Header.html#line.192">parser</a></pre> |
| <div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartParser.html" title="interface in org.apache.juneau.httppart"><code>HttpPartParser</code></a> class used for parsing strings to values. |
| |
| <p> |
| Overrides for this part the part parser defined on the REST resource which by default is <a href="../../../../../org/apache/juneau/oapi/OpenApiParser.html" title="class in org.apache.juneau.oapi"><code>OpenApiParser</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The annotation value.</dd> |
| </dl> |
| <dl> |
| <dt>Default:</dt> |
| <dd>org.apache.juneau.httppart.HttpPartParser.Void.class</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="schema--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>schema</h4> |
| <pre>public abstract <a href="../../../../../org/apache/juneau/annotation/Schema.html" title="annotation in org.apache.juneau.annotation">Schema</a> <a href="../../../../../src-html/org/apache/juneau/http/annotation/Header.html#line.217">schema</a></pre> |
| <div class="block"><mk>schema</mk> field of the <a class='doclink' href='https://swagger.io/specification/v2#parameterObject'>Swagger Parameter Object</a>. |
| |
| <p> |
| The schema defining the type used for parameter. |
| |
| <p> |
| The <a href="../../../../../org/apache/juneau/annotation/Schema.html" title="annotation in org.apache.juneau.annotation"><code>@Schema</code></a> annotation can also be used standalone on the parameter or type. |
| Values specified on this field override values specified on the type, and values specified on child types override values |
| specified on parent types. |
| |
| <h5 class='section'>Used for:</h5> |
| <ul class='spaced-list'> |
| <li> |
| Server-side schema-based parsing and parsing validation. |
| <li> |
| Server-side generated Swagger documentation. |
| <li> |
| Client-side schema-based serializing and serializing validation. |
| </ul></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The annotation value.</dd> |
| </dl> |
| <dl> |
| <dt>Default:</dt> |
| <dd>@org.apache.juneau.annotation.Schema</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="serializer--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>serializer</h4> |
| <pre>public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart">HttpPartSerializer</a>> <a href="../../../../../src-html/org/apache/juneau/http/annotation/Header.html#line.227">serializer</a></pre> |
| <div class="block">Specifies the <a href="../../../../../org/apache/juneau/httppart/HttpPartSerializer.html" title="interface in org.apache.juneau.httppart"><code>HttpPartSerializer</code></a> class used for serializing values to strings. |
| |
| <p> |
| Overrides for this part the part serializer defined on the REST client which by default is <a href="../../../../../org/apache/juneau/oapi/OpenApiSerializer.html" title="class in org.apache.juneau.oapi"><code>OpenApiSerializer</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The annotation value.</dd> |
| </dl> |
| <dl> |
| <dt>Default:</dt> |
| <dd>org.apache.juneau.httppart.HttpPartSerializer.Void.class</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="value--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>value</h4> |
| <pre>public abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/juneau/http/annotation/Header.html#line.246">value</a></pre> |
| <div class="block">A synonym for <a href="../../../../../org/apache/juneau/http/annotation/Header.html#name--"><code>name()</code></a>. |
| |
| <p> |
| Allows you to use shortened notation if you're only specifying the name. |
| |
| <p> |
| The following are completely equivalent ways of defining a header entry: |
| <p class='bjava'> |
| <jk>public</jk> Order placeOrder(<ja>@Header</ja>(name=<js>"api_key"</js>) String <jv>apiKey</jv>) {...} |
| </p> |
| <p class='bjava'> |
| <jk>public</jk> Order placeOrder(<ja>@Header</ja>(<js>"api_key"</js>) String <jv>apiKey</jv>) {...} |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The annotation value.</dd> |
| </dl> |
| <dl> |
| <dt>Default:</dt> |
| <dd>""</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/juneau/http/annotation/HasQueryAnnotation.Builder.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/juneau/http/annotation/HeaderAnnotation.html" title="class in org.apache.juneau.http.annotation"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/juneau/http/annotation/Header.html" target="_top">Frames</a></li> |
| <li><a href="Header.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Field | </li> |
| <li>Required | </li> |
| <li><a href="#annotation.type.optional.element.summary">Optional</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#annotation.type.element.detail">Element</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2016–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |