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 */ 017package org.apache.juneau.http.classic; 018 019import org.apache.juneau.http.classic.response.*; 020 021/** 022 * Standard predefined HTTP responses. 023 * 024 * <h5 class='section'>See Also:</h5><ul> 025 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauRestCommon">juneau-rest-common</a> 026 * </ul> 027 */ 028@SuppressWarnings({ 029 "java:S1845" // Static factory methods (accepted(), ...) intentionally share names with the ACCEPTED-style constants, differing only by case 030}) 031public class HttpResponses { 032 033 /** 034 * Prevents instantiation. 035 */ 036 private HttpResponses() {} 037 038 /** 039 * A synonym for {@link Accepted#INSTANCE}. 040 */ 041 public static final Accepted ACCEPTED = Accepted.INSTANCE; 042 043 /** 044 * A synonym for {@link AlreadyReported#INSTANCE}. 045 */ 046 public static final AlreadyReported ALREADY_REPORTED = AlreadyReported.INSTANCE; 047 048 /** 049 * A synonym for {@link BadRequest#INSTANCE}. 050 */ 051 public static final BadRequest BAD_REQUEST = BadRequest.INSTANCE; 052 053 /** 054 * A synonym for {@link Conflict#INSTANCE}. 055 */ 056 public static final Conflict CONFLICT = Conflict.INSTANCE; 057 058 /** 059 * A synonym for {@link Continue#INSTANCE}. 060 */ 061 public static final Continue CONTINUE = Continue.INSTANCE; 062 063 /** 064 * A synonym for {@link Created#INSTANCE}. 065 */ 066 public static final Created CREATED = Created.INSTANCE; 067 068 /** 069 * A synonym for {@link EarlyHints#INSTANCE}. 070 */ 071 public static final EarlyHints EARLY_HINTS = EarlyHints.INSTANCE; 072 073 /** 074 * A synonym for {@link ExpectationFailed#INSTANCE}. 075 */ 076 public static final ExpectationFailed EXPECTATION_FAILED = ExpectationFailed.INSTANCE; 077 078 /** 079 * A synonym for {@link FailedDependency#INSTANCE}. 080 */ 081 public static final FailedDependency FAILED_DEPENDENCY = FailedDependency.INSTANCE; 082 083 /** 084 * A synonym for {@link Forbidden#INSTANCE}. 085 */ 086 public static final Forbidden FORBIDDEN = Forbidden.INSTANCE; 087 088 /** 089 * A synonym for {@link Found#INSTANCE}. 090 */ 091 public static final Found FOUND = Found.INSTANCE; 092 093 /** 094 * A synonym for {@link Gone#INSTANCE}. 095 */ 096 public static final Gone GONE = Gone.INSTANCE; 097 098 /** 099 * A synonym for {@link HttpVersionNotSupported#INSTANCE}. 100 */ 101 public static final HttpVersionNotSupported HTTP_VERSION_NOT_SUPPORTED = HttpVersionNotSupported.INSTANCE; 102 103 /** 104 * A synonym for {@link IMUsed#INSTANCE}. 105 */ 106 public static final IMUsed IM_USED = IMUsed.INSTANCE; 107 108 /** 109 * A synonym for {@link InsufficientStorage#INSTANCE}. 110 */ 111 public static final InsufficientStorage INSUFFICIENT_STORAGE = InsufficientStorage.INSTANCE; 112 113 /** 114 * A synonym for {@link InternalServerError#INSTANCE}. 115 */ 116 public static final InternalServerError INTERNAL_SERVER_ERROR = InternalServerError.INSTANCE; 117 118 /** 119 * A synonym for {@link LengthRequired#INSTANCE}. 120 */ 121 public static final LengthRequired LENGTH_REQUIRED = LengthRequired.INSTANCE; 122 123 /** 124 * A synonym for {@link Locked#INSTANCE}. 125 */ 126 public static final Locked LOCKED = Locked.INSTANCE; 127 128 /** 129 * A synonym for {@link LoopDetected#INSTANCE}. 130 */ 131 public static final LoopDetected LOOP_DETECTED = LoopDetected.INSTANCE; 132 133 /** 134 * A synonym for {@link MethodNotAllowed#INSTANCE}. 135 */ 136 public static final MethodNotAllowed METHOD_NOT_ALLOWED = MethodNotAllowed.INSTANCE; 137 138 /** 139 * A synonym for {@link MisdirectedRequest#INSTANCE}. 140 */ 141 public static final MisdirectedRequest MISDIRECTED_REQUEST = MisdirectedRequest.INSTANCE; 142 143 /** 144 * A synonym for {@link MovedPermanently#INSTANCE}. 145 */ 146 public static final MovedPermanently MOVED_PERMANENTLY = MovedPermanently.INSTANCE; 147 148 /** 149 * A synonym for {@link MultiStatus#INSTANCE}. 150 */ 151 public static final MultiStatus MULTI_STATUS = MultiStatus.INSTANCE; 152 153 /** 154 * A synonym for {@link MultipleChoices#INSTANCE}. 155 */ 156 public static final MultipleChoices MULTIPLE_CHOICES = MultipleChoices.INSTANCE; 157 158 /** 159 * A synonym for {@link NetworkAuthenticationRequired#INSTANCE}. 160 */ 161 public static final NetworkAuthenticationRequired NETWORK_AUTHENTICATION_REQUIRED = NetworkAuthenticationRequired.INSTANCE; 162 163 /** 164 * A synonym for {@link NoContent#INSTANCE}. 165 */ 166 public static final NoContent NO_CONTENT = NoContent.INSTANCE; 167 168 /** 169 * A synonym for {@link NonAuthoritiveInformation#INSTANCE}. 170 */ 171 public static final NonAuthoritiveInformation NON_AUTHORATIVE_INFORMATION = NonAuthoritiveInformation.INSTANCE; 172 173 /** 174 * A synonym for {@link NotAcceptable#INSTANCE}. 175 */ 176 public static final NotAcceptable NOT_ACCEPTABLE = NotAcceptable.INSTANCE; 177 178 /** 179 * A synonym for {@link NotExtended#INSTANCE}. 180 */ 181 public static final NotExtended NOT_EXTENDED = NotExtended.INSTANCE; 182 183 /** 184 * A synonym for {@link NotFound#INSTANCE}. 185 */ 186 public static final NotFound NOT_FOUND = NotFound.INSTANCE; 187 188 /** 189 * A synonym for {@link NotImplemented#INSTANCE}. 190 */ 191 public static final NotImplemented NOT_IMPLEMENTED = NotImplemented.INSTANCE; 192 193 /** 194 * A synonym for {@link NotModified#INSTANCE}. 195 */ 196 public static final NotModified NOT_MODIFIED = NotModified.INSTANCE; 197 198 /** 199 * A synonym for {@link Ok#INSTANCE}. 200 */ 201 public static final Ok OK = Ok.INSTANCE; 202 203 /** 204 * A synonym for {@link PartialContent#INSTANCE}. 205 */ 206 public static final PartialContent PARTIAL_CONTENT = PartialContent.INSTANCE; 207 208 /** 209 * A synonym for {@link PayloadTooLarge#INSTANCE}. 210 */ 211 public static final PayloadTooLarge PAYLOAD_TOO_LARGE = PayloadTooLarge.INSTANCE; 212 213 /** 214 * A synonym for {@link PermanentRedirect#INSTANCE}. 215 */ 216 public static final PermanentRedirect PERMANENT_REDIRECT = PermanentRedirect.INSTANCE; 217 218 /** 219 * A synonym for {@link PreconditionFailed#INSTANCE}. 220 */ 221 public static final PreconditionFailed PRECONDITION_FAILED = PreconditionFailed.INSTANCE; 222 223 /** 224 * A synonym for {@link PreconditionRequired#INSTANCE}. 225 */ 226 public static final PreconditionRequired PRECONDITION_REQUIRED = PreconditionRequired.INSTANCE; 227 228 /** 229 * A synonym for {@link Processing#INSTANCE}. 230 */ 231 public static final Processing PROCESSING = Processing.INSTANCE; 232 233 /** 234 * A synonym for {@link RangeNotSatisfiable#INSTANCE}. 235 */ 236 public static final RangeNotSatisfiable RANGE_NOT_SATISFIABLE = RangeNotSatisfiable.INSTANCE; 237 238 /** 239 * A synonym for {@link RequestHeaderFieldsTooLarge#INSTANCE}. 240 */ 241 public static final RequestHeaderFieldsTooLarge REQUEST_HEADER_FIELDS_TOO_LARGE = RequestHeaderFieldsTooLarge.INSTANCE; 242 243 /** 244 * A synonym for {@link ResetContent#INSTANCE}. 245 */ 246 public static final ResetContent RESET_CONTENT = ResetContent.INSTANCE; 247 248 /** 249 * A synonym for {@link SeeOther#INSTANCE}. 250 */ 251 public static final SeeOther SEE_OTHER = SeeOther.INSTANCE; 252 253 /** 254 * A synonym for {@link ServiceUnavailable#INSTANCE}. 255 */ 256 public static final ServiceUnavailable SERVICE_UNAVAILABLE = ServiceUnavailable.INSTANCE; 257 258 /** 259 * A synonym for {@link SwitchingProtocols#INSTANCE}. 260 */ 261 public static final SwitchingProtocols SWITCHING_PROTOCOLS = SwitchingProtocols.INSTANCE; 262 263 /** 264 * A synonym for {@link TemporaryRedirect#INSTANCE}. 265 */ 266 public static final TemporaryRedirect TEMPORARY_REDIRECT = TemporaryRedirect.INSTANCE; 267 268 /** 269 * A synonym for {@link TooManyRequests#INSTANCE}. 270 */ 271 public static final TooManyRequests TOO_MANY_REQUESTS = TooManyRequests.INSTANCE; 272 273 /** 274 * A synonym for {@link Unauthorized#INSTANCE}. 275 */ 276 public static final Unauthorized UNAUTHORIZED = Unauthorized.INSTANCE; 277 278 /** 279 * A synonym for {@link UnavailableForLegalReasons#INSTANCE}. 280 */ 281 public static final UnavailableForLegalReasons UNAVAILABLE_FOR_LEGAL_REASONS = UnavailableForLegalReasons.INSTANCE; 282 283 /** 284 * A synonym for {@link UnprocessableEntity#INSTANCE}. 285 */ 286 public static final UnprocessableEntity UNPROCESSABLE_ENTITIY = UnprocessableEntity.INSTANCE; 287 288 /** 289 * A synonym for {@link UnsupportedMediaType#INSTANCE}. 290 */ 291 public static final UnsupportedMediaType UNSUPPORTED_MEDIA_TYPE = UnsupportedMediaType.INSTANCE; 292 293 /** 294 * A synonym for {@link UpgradeRequired#INSTANCE}. 295 */ 296 public static final UpgradeRequired UPGRADE_REQUIRED = UpgradeRequired.INSTANCE; 297 298 /** 299 * A synonym for {@link UriTooLong#INSTANCE}. 300 */ 301 public static final UriTooLong URI_TOO_LONG = UriTooLong.INSTANCE; 302 303 /** 304 * A synonym for {@link UseProxy#INSTANCE}. 305 */ 306 public static final UseProxy USE_PROXY = UseProxy.INSTANCE; 307 308 /** 309 * A synonym for {@link VariantAlsoNegotiates#INSTANCE}. 310 */ 311 public static final VariantAlsoNegotiates VARIANT_ALSO_NEGOTIATES = VariantAlsoNegotiates.INSTANCE; 312 313 /** 314 * A shortcut for calling {@link Continue#Continue()}. 315 * 316 * @return A new bean. 317 */ 318 @SuppressWarnings({ 319 "java:S100" // Method name uses underscore suffix to avoid Java keyword conflict 320 }) 321 public static final Continue continue_() { 322 return new Continue(); 323 } 324 325 /** 326 * A shortcut for calling {@link Accepted#Accepted()}. 327 * 328 * @return A new bean. 329 */ 330 public static final Accepted accepted() { 331 return new Accepted(); 332 } 333 334 /** 335 * A shortcut for calling {@link AlreadyReported#AlreadyReported()}. 336 * 337 * @return A new bean. 338 */ 339 public static final AlreadyReported alreadyReported() { 340 return new AlreadyReported(); 341 } 342 343 /** 344 * A shortcut for calling {@link BadRequest#BadRequest()}. 345 * 346 * @return A new bean builder. 347 */ 348 public static final BadRequest badRequest() { 349 return new BadRequest(); 350 } 351 352 /** 353 * A shortcut for calling {@link Conflict#Conflict()}. 354 * 355 * @return A new bean builder. 356 */ 357 public static final Conflict conflict() { 358 return new Conflict(); 359 } 360 361 /** 362 * A shortcut for calling {@link Created#Created()}. 363 * 364 * @return A new bean. 365 */ 366 public static final Created created() { 367 return new Created(); 368 } 369 370 /** 371 * A shortcut for calling {@link EarlyHints#EarlyHints()}. 372 * 373 * @return A new bean. 374 */ 375 public static final EarlyHints earlyHints() { 376 return new EarlyHints(); 377 } 378 379 /** 380 * A shortcut for calling {@link ExpectationFailed#ExpectationFailed()}. 381 * 382 * @return A new bean builder. 383 */ 384 public static final ExpectationFailed expectationFailed() { 385 return new ExpectationFailed(); 386 } 387 388 /** 389 * A shortcut for calling {@link FailedDependency#FailedDependency()}. 390 * 391 * @return A new bean builder. 392 */ 393 public static final FailedDependency failedDependency() { 394 return new FailedDependency(); 395 } 396 397 /** 398 * A shortcut for calling {@link Forbidden#Forbidden()}. 399 * 400 * @return A new bean builder. 401 */ 402 public static final Forbidden forbidden() { 403 return new Forbidden(); 404 } 405 406 /** 407 * A shortcut for calling {@link Found#Found()}. 408 * 409 * @param location The value for the Location header. 410 * @return A new bean. 411 */ 412 public static final Found found(String location) { 413 return new Found().setLocation(location); 414 } 415 416 /** 417 * A shortcut for calling {@link Gone#Gone()}. 418 * 419 * @return A new bean builder. 420 */ 421 public static final Gone gone() { 422 return new Gone(); 423 } 424 425 /** 426 * A shortcut for calling {@link BasicHttpException#BasicHttpException()}. 427 * 428 * @return A new bean builder. 429 */ 430 public static final BasicHttpException httpException() { 431 return new BasicHttpException(); 432 } 433 434 /** 435 * A shortcut for calling {@link HttpVersionNotSupported#HttpVersionNotSupported()}. 436 * 437 * @return A new bean builder. 438 */ 439 public static final HttpVersionNotSupported httpVersionNotSupported() { 440 return new HttpVersionNotSupported(); 441 } 442 443 /** 444 * A shortcut for calling {@link IMUsed#IMUsed()}. 445 * 446 * @return A new bean. 447 */ 448 public static final IMUsed imUsed() { 449 return new IMUsed(); 450 } 451 452 /** 453 * A shortcut for calling {@link InsufficientStorage#InsufficientStorage()}. 454 * 455 * @return A new bean builder. 456 */ 457 public static final InsufficientStorage insufficientStorage() { 458 return new InsufficientStorage(); 459 } 460 461 /** 462 * A shortcut for calling {@link InternalServerError#InternalServerError()}. 463 * 464 * @return A new bean builder. 465 */ 466 public static final InternalServerError internalServerError() { 467 return new InternalServerError(); 468 } 469 470 /** 471 * A shortcut for calling {@link LengthRequired#LengthRequired()}. 472 * 473 * @return A new bean builder. 474 */ 475 public static final LengthRequired lengthRequired() { 476 return new LengthRequired(); 477 } 478 479 /** 480 * A shortcut for calling {@link Locked#Locked()}. 481 * 482 * @return A new bean builder. 483 */ 484 public static final Locked locked() { 485 return new Locked(); 486 } 487 488 /** 489 * A shortcut for calling {@link LoopDetected#LoopDetected()}. 490 * 491 * @return A new bean builder. 492 */ 493 public static final LoopDetected loopDetected() { 494 return new LoopDetected(); 495 } 496 497 /** 498 * A shortcut for calling {@link MethodNotAllowed#MethodNotAllowed()}. 499 * 500 * @return A new bean builder. 501 */ 502 public static final MethodNotAllowed methodNotAllowed() { 503 return new MethodNotAllowed(); 504 } 505 506 /** 507 * A shortcut for calling {@link MisdirectedRequest#MisdirectedRequest()}. 508 * 509 * @return A new bean builder. 510 */ 511 public static final MisdirectedRequest misdirectedRequest() { 512 return new MisdirectedRequest(); 513 } 514 515 /** 516 * A shortcut for calling {@link MovedPermanently#MovedPermanently()}. 517 * 518 * @param location The value for the Location header. 519 * @return A new bean. 520 */ 521 public static final MovedPermanently movedPermanently(String location) { 522 return new MovedPermanently().setLocation(location); 523 } 524 525 /** 526 * A shortcut for calling {@link MovedPermanently#MovedPermanently()}. 527 * 528 * @return A new bean. 529 */ 530 public static final MultipleChoices multipleChoices() { 531 return new MultipleChoices(); 532 } 533 534 /** 535 * A shortcut for calling {@link MultiStatus#MultiStatus()}. 536 * 537 * @return A new bean. 538 */ 539 public static final MultiStatus multiStatus() { 540 return new MultiStatus(); 541 } 542 543 /** 544 * A shortcut for calling {@link NetworkAuthenticationRequired#NetworkAuthenticationRequired()}. 545 * 546 * @return A new bean builder. 547 */ 548 public static final NetworkAuthenticationRequired networkAuthenticationRequired() { 549 return new NetworkAuthenticationRequired(); 550 } 551 552 /** 553 * A shortcut for calling {@link NoContent#NoContent()}. 554 * 555 * @return A new bean. 556 */ 557 public static final NoContent noContent() { 558 return new NoContent(); 559 } 560 561 /** 562 * A shortcut for calling {@link NonAuthoritiveInformation#NonAuthoritiveInformation()}. 563 * 564 * @return A new bean. 565 */ 566 public static final NonAuthoritiveInformation nonAuthoritiveInformation() { 567 return new NonAuthoritiveInformation(); 568 } 569 570 /** 571 * A shortcut for calling {@link NotAcceptable#NotAcceptable()}. 572 * 573 * @return A new bean builder. 574 */ 575 public static final NotAcceptable notAcceptable() { 576 return new NotAcceptable(); 577 } 578 579 /** 580 * A shortcut for calling {@link NotExtended#NotExtended()}. 581 * 582 * @return A new bean builder. 583 */ 584 public static final NotExtended notExtended() { 585 return new NotExtended(); 586 } 587 588 /** 589 * A shortcut for calling {@link NotFound#NotFound()}. 590 * 591 * @return A new bean builder. 592 */ 593 public static final NotFound notFound() { 594 return new NotFound(); 595 } 596 597 /** 598 * A shortcut for calling {@link NotImplemented#NotImplemented()}. 599 * 600 * @return A new bean builder. 601 */ 602 public static final NotImplemented notImplemented() { 603 return new NotImplemented(); 604 } 605 606 /** 607 * A shortcut for calling {@link NotModified#NotModified()}. 608 * 609 * @return A new bean. 610 */ 611 public static final NotModified notModified() { 612 return new NotModified(); 613 } 614 615 /** 616 * A shortcut for calling {@link Ok#Ok()}. 617 * 618 * @return A new bean. 619 */ 620 public static final Ok ok() { 621 return new Ok(); 622 } 623 624 /** 625 * A shortcut for calling {@link PartialContent#PartialContent()}. 626 * 627 * @return A new bean. 628 */ 629 public static final PartialContent partialContent() { 630 return new PartialContent(); 631 } 632 633 /** 634 * A shortcut for calling {@link PayloadTooLarge#PayloadTooLarge()}. 635 * 636 * @return A new bean builder. 637 */ 638 public static final PayloadTooLarge payloadTooLarge() { 639 return new PayloadTooLarge(); 640 } 641 642 /** 643 * A shortcut for calling {@link PermanentRedirect#PermanentRedirect()}. 644 * 645 * @param location The value for the Location header. 646 * @return A new bean. 647 */ 648 public static final PermanentRedirect permanentRedirect(String location) { 649 return new PermanentRedirect().setLocation(location); 650 } 651 652 /** 653 * A shortcut for calling {@link PreconditionFailed#PreconditionFailed()}. 654 * 655 * @return A new bean builder. 656 */ 657 public static final PreconditionFailed preconditionFailed() { 658 return new PreconditionFailed(); 659 } 660 661 /** 662 * A shortcut for calling {@link PreconditionRequired#PreconditionRequired()}. 663 * 664 * @return A new bean builder. 665 */ 666 public static final PreconditionRequired preconditionRequired() { 667 return new PreconditionRequired(); 668 } 669 670 /** 671 * A shortcut for calling {@link Processing#Processing()}. 672 * 673 * @return A new bean. 674 */ 675 public static final Processing processing() { 676 return new Processing(); 677 } 678 679 /** 680 * A shortcut for calling {@link RangeNotSatisfiable#RangeNotSatisfiable()}. 681 * 682 * @return A new bean builder. 683 */ 684 public static final RangeNotSatisfiable rangeNotSatisfiable() { 685 return new RangeNotSatisfiable(); 686 } 687 688 /** 689 * A shortcut for calling {@link RequestHeaderFieldsTooLarge#RequestHeaderFieldsTooLarge()}. 690 * 691 * @return A new bean builder. 692 */ 693 public static final RequestHeaderFieldsTooLarge requestHeaderFieldsTooLarge() { 694 return new RequestHeaderFieldsTooLarge(); 695 } 696 697 /** 698 * A shortcut for calling {@link ResetContent#ResetContent()}. 699 * 700 * @return A new bean. 701 */ 702 public static final ResetContent resetContent() { 703 return new ResetContent(); 704 } 705 706 /** 707 * A shortcut for calling {@link SeeOther#SeeOther()}. 708 * 709 * @param location The value for the Location header. 710 * @return A new bean. 711 */ 712 public static final SeeOther seeOther(String location) { 713 return new SeeOther().setLocation(location); 714 } 715 716 /** 717 * A shortcut for calling {@link ServiceUnavailable#ServiceUnavailable()}. 718 * 719 * @return A new bean builder. 720 */ 721 public static final ServiceUnavailable serviceUnavailable() { 722 return new ServiceUnavailable(); 723 } 724 725 /** 726 * A shortcut for calling {@link SwitchingProtocols#SwitchingProtocols()}. 727 * 728 * @return A new bean. 729 */ 730 public static final SwitchingProtocols switchingProtocols() { 731 return new SwitchingProtocols(); 732 } 733 734 /** 735 * A shortcut for calling {@link TemporaryRedirect#TemporaryRedirect()}. 736 * 737 * @param location The value for the Location header. 738 * @return A new bean. 739 */ 740 public static final TemporaryRedirect temporaryRedirect(String location) { 741 return new TemporaryRedirect().setLocation(location); 742 } 743 744 /** 745 * A shortcut for calling {@link TooManyRequests#TooManyRequests()}. 746 * 747 * @return A new bean builder. 748 */ 749 public static final TooManyRequests tooManyRequests() { 750 return new TooManyRequests(); 751 } 752 753 /** 754 * A shortcut for calling {@link Unauthorized#Unauthorized()}. 755 * 756 * @return A new bean builder. 757 */ 758 public static final Unauthorized unauthorized() { 759 return new Unauthorized(); 760 } 761 762 /** 763 * A shortcut for calling {@link UnavailableForLegalReasons#UnavailableForLegalReasons()}. 764 * 765 * @return A new bean builder. 766 */ 767 public static final UnavailableForLegalReasons unavailableForLegalReasons() { 768 return new UnavailableForLegalReasons(); 769 } 770 771 /** 772 * A shortcut for calling {@link UnprocessableEntity#UnprocessableEntity()}. 773 * 774 * @return A new bean builder. 775 */ 776 public static final UnprocessableEntity unprocessableEntity() { 777 return new UnprocessableEntity(); 778 } 779 780 /** 781 * A shortcut for calling {@link UnsupportedMediaType#UnsupportedMediaType()}. 782 * 783 * @return A new bean builder. 784 */ 785 public static final UnsupportedMediaType unsupportedMediaType() { 786 return new UnsupportedMediaType(); 787 } 788 789 /** 790 * A shortcut for calling {@link UpgradeRequired#UpgradeRequired()}. 791 * 792 * @return A new bean builder. 793 */ 794 public static final UpgradeRequired upgradeRequired() { 795 return new UpgradeRequired(); 796 } 797 798 /** 799 * A shortcut for calling {@link UriTooLong#UriTooLong()}. 800 * 801 * @return A new bean builder. 802 */ 803 public static final UriTooLong uriTooLong() { 804 return new UriTooLong(); 805 } 806 807 /** 808 * A shortcut for calling {@link UseProxy#UseProxy()}. 809 * 810 * @return A new bean. 811 */ 812 public static final UseProxy useProxy() { 813 return new UseProxy(); 814 } 815 816 /** 817 * A shortcut for calling {@link VariantAlsoNegotiates#VariantAlsoNegotiates()}. 818 * 819 * @return A new bean builder. 820 */ 821 public static final VariantAlsoNegotiates variantAlsoNegotiates() { 822 return new VariantAlsoNegotiates(); 823 } 824}