src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/SelectOptimalEncodingFeature.java

Wed, 12 Jun 2013 14:47:09 +0100

author
mkos
date
Wed, 12 Jun 2013 14:47:09 +0100
changeset 384
8f2986ff0235
parent 368
0989ad8c0860
child 637
9c07ef4934dd
permissions
-rw-r--r--

8013021: Rebase 8005432 & 8003542 against the latest jdk8/jaxws
8003542: Improve processing of MTOM attachments
8005432: Update access to JAX-WS
Reviewed-by: mullan

     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Oracle in the LICENSE file that accompanied this code.
    10  *
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14  * version 2 for more details (a copy is included in the LICENSE file that
    15  * accompanied this code).
    16  *
    17  * You should have received a copy of the GNU General Public License version
    18  * 2 along with this work; if not, write to the Free Software Foundation,
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  *
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    22  * or visit www.oracle.com if you need additional information or have any
    23  * questions.
    24  */
    26 package com.sun.xml.internal.ws.api.client;
    28 import com.sun.xml.internal.ws.api.FeatureConstructor;
    30 import javax.xml.ws.WebServiceFeature;
    32 import com.sun.org.glassfish.gmbal.ManagedAttribute;
    33 import com.sun.org.glassfish.gmbal.ManagedData;
    35 /**
    36  * Client side feature to enable or disable the selection of the optimal
    37  * encoding by the client when sending outbound messages.
    38  * <p>
    39  * The following describes the affects of this feature with respect
    40  * to being enabled or disabled:
    41  * <ul>
    42  *  <li> ENABLED: In this Mode, the most optimal encoding will be selected
    43  *       depending on the configuration and capabilities of the client
    44  *       the capabilities of the Web service.
    45  *  <li> DISABLED: In this Mode, the default encoding will be selected.
    46  * </ul>
    47  * <p>
    48  * If this feature is not present on a Web service then the default behaviour
    49  * is equivalent to this feature being present and disabled.
    50  * <p>
    51  * If this feature is enabled by the client and the Service supports the
    52  * Fast Infoset encoding, as specified by the {@link com.sun.xml.internal.ws.api.fastinfoset.FastInfosetFeature},
    53  * and Fast Infoset is determined to be the most optimal encoding, then the
    54  * Fast Infoset encoding will be automatically selected by the client.
    55  * <p>
    56  * TODO: Still not sure if a feature is a server side only thing or can
    57  * also be a client side thing. If the former then this class should be
    58  * removed.
    59  * @author Paul.Sandoz@Sun.Com
    60  */
    61 @ManagedData
    62 public class SelectOptimalEncodingFeature extends WebServiceFeature {
    63     /**
    64      * Constant value identifying the {@link SelectOptimalEncodingFeature}
    65      */
    66     public static final String ID = "http://java.sun.com/xml/ns/jaxws/client/selectOptimalEncoding";
    68     /**
    69      * Create a {@link SelectOptimalEncodingFeature}.
    70      * The instance created will be enabled.
    71      */
    72     public SelectOptimalEncodingFeature() {
    73         this.enabled = true;
    74     }
    76     /**
    77      * Create a {@link SelectOptimalEncodingFeature}
    78      *
    79      * @param enabled specifies whether this feature should
    80      *                be enabled or not.
    81      */
    82     @FeatureConstructor({"enabled"})
    83     public SelectOptimalEncodingFeature(boolean enabled) {
    84         this.enabled = enabled;
    85     }
    87     /**
    88      * {@inheritDoc}
    89      */
    90     @ManagedAttribute
    91     public String getID() {
    92         return ID;
    93     }
    94 }

mercurial