src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorRootService.java

Tue, 09 Apr 2013 14:51:13 +0100

author
alanb
date
Tue, 09 Apr 2013 14:51:13 +0100
changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
permissions
-rw-r--r--

8010393: Update JAX-WS RI to 2.2.9-b12941
Reviewed-by: alanb, erikj
Contributed-by: miroslav.kos@oracle.com, martin.grebac@oracle.com

ohair@286 1 /*
alanb@368 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
ohair@286 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@286 4 *
ohair@286 5 * This code is free software; you can redistribute it and/or modify it
ohair@286 6 * under the terms of the GNU General Public License version 2 only, as
ohair@286 7 * published by the Free Software Foundation. Oracle designates this
ohair@286 8 * particular file as subject to the "Classpath" exception as provided
ohair@286 9 * by Oracle in the LICENSE file that accompanied this code.
ohair@286 10 *
ohair@286 11 * This code is distributed in the hope that it will be useful, but WITHOUT
ohair@286 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@286 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@286 14 * version 2 for more details (a copy is included in the LICENSE file that
ohair@286 15 * accompanied this code).
ohair@286 16 *
ohair@286 17 * You should have received a copy of the GNU General Public License version
ohair@286 18 * 2 along with this work; if not, write to the Free Software Foundation,
ohair@286 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@286 20 *
ohair@286 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@286 22 * or visit www.oracle.com if you need additional information or have any
ohair@286 23 * questions.
ohair@286 24 */
ohair@286 25
ohair@286 26 package com.sun.xml.internal.ws.server;
ohair@286 27
ohair@286 28 import com.sun.istack.internal.NotNull;
ohair@286 29 import com.sun.xml.internal.ws.api.BindingID;
ohair@286 30 import com.sun.xml.internal.ws.api.WSFeatureList;
ohair@286 31 import com.sun.xml.internal.ws.api.EndpointAddress;
ohair@286 32 import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
ohair@286 33 import com.sun.xml.internal.ws.api.server.*;
ohair@286 34 import com.sun.xml.internal.ws.transport.http.HttpAdapter;
ohair@286 35 import com.sun.xml.internal.ws.util.RuntimeVersion;
ohair@286 36 import com.sun.org.glassfish.gmbal.AMXMetadata;
ohair@286 37 import com.sun.org.glassfish.gmbal.Description;
ohair@286 38 import com.sun.org.glassfish.gmbal.ManagedAttribute;
ohair@286 39 import com.sun.org.glassfish.gmbal.ManagedObject;
ohair@286 40 import java.net.URL;
ohair@286 41 import javax.xml.namespace.QName;
ohair@286 42 import java.util.*;
ohair@286 43
ohair@286 44 /**
ohair@286 45 * @author Harold Carr
ohair@286 46 */
ohair@286 47 @ManagedObject
ohair@286 48 @Description("Metro Web Service endpoint")
ohair@286 49 @AMXMetadata(type="WSEndpoint")
ohair@286 50 public final class MonitorRootService extends MonitorBase {
ohair@286 51
ohair@286 52 private final WSEndpoint endpoint;
ohair@286 53
ohair@286 54 MonitorRootService(final WSEndpoint endpoint) {
ohair@286 55 this.endpoint = endpoint;
ohair@286 56 }
ohair@286 57
ohair@286 58 //
ohair@286 59 // Items from WSEndpoint
ohair@286 60 //
ohair@286 61
ohair@286 62 @ManagedAttribute
ohair@286 63 @Description("Policy associated with Endpoint")
ohair@286 64 public String policy() {
ohair@286 65 return endpoint.getPolicyMap() != null ?
ohair@286 66 endpoint.getPolicyMap().toString() : null;
ohair@286 67 }
ohair@286 68
ohair@286 69 @ManagedAttribute
ohair@286 70 @Description("Container")
ohair@286 71 public @NotNull Container container() {
ohair@286 72 return endpoint.getContainer();
ohair@286 73 }
ohair@286 74
ohair@286 75
ohair@286 76 @ManagedAttribute
ohair@286 77 @Description("Port name")
ohair@286 78 public @NotNull QName portName() {
ohair@286 79 return endpoint.getPortName();
ohair@286 80 }
ohair@286 81
ohair@286 82 @ManagedAttribute
ohair@286 83 @Description("Service name")
ohair@286 84 public @NotNull QName serviceName() {
ohair@286 85 return endpoint.getServiceName();
ohair@286 86 }
ohair@286 87
ohair@286 88 //
ohair@286 89 // Items from WSBinding
ohair@286 90 //
ohair@286 91
ohair@286 92 @ManagedAttribute
ohair@286 93 @Description("Binding SOAP Version")
ohair@286 94 public String soapVersionHttpBindingId() {
ohair@286 95 return endpoint.getBinding().getSOAPVersion().httpBindingId;
ohair@286 96 }
ohair@286 97
ohair@286 98 @ManagedAttribute
ohair@286 99 @Description("Binding Addressing Version")
ohair@286 100 public AddressingVersion addressingVersion() {
ohair@286 101 return endpoint.getBinding().getAddressingVersion();
ohair@286 102 }
ohair@286 103
ohair@286 104 @ManagedAttribute
ohair@286 105 @Description("Binding Identifier")
ohair@286 106 public @NotNull BindingID bindingID() {
ohair@286 107 return endpoint.getBinding().getBindingId();
ohair@286 108 }
ohair@286 109
ohair@286 110 @ManagedAttribute
ohair@286 111 @Description("Binding features")
ohair@286 112 public @NotNull WSFeatureList features() {
ohair@286 113 return endpoint.getBinding().getFeatures();
ohair@286 114 }
ohair@286 115
ohair@286 116 //
ohair@286 117 // Items from WSDLPort
ohair@286 118 //
ohair@286 119
ohair@286 120 @ManagedAttribute
ohair@286 121 @Description("WSDLPort bound port type")
ohair@286 122 public QName wsdlPortTypeName() {
ohair@286 123 return endpoint.getPort() != null ?
ohair@286 124 endpoint.getPort().getBinding().getPortTypeName() : null;
ohair@286 125 }
ohair@286 126
ohair@286 127 @ManagedAttribute
ohair@286 128 @Description("Endpoint address")
ohair@286 129 public EndpointAddress wsdlEndpointAddress() {
ohair@286 130 return endpoint.getPort() != null ?
ohair@286 131 endpoint.getPort().getAddress() : null;
ohair@286 132 }
ohair@286 133
ohair@286 134 //
ohair@286 135 // Items from ServiceDefinition
ohair@286 136 //
ohair@286 137
ohair@286 138 @ManagedAttribute
ohair@286 139 @Description("Documents referenced")
ohair@286 140 public Set<String> serviceDefinitionImports() {
ohair@286 141 return endpoint.getServiceDefinition() != null ?
ohair@286 142 endpoint.getServiceDefinition().getPrimary().getImports() : null;
ohair@286 143 }
ohair@286 144
ohair@286 145 @ManagedAttribute
ohair@286 146 @Description("System ID where document is taken from")
ohair@286 147 public URL serviceDefinitionURL() {
ohair@286 148 return endpoint.getServiceDefinition() != null ?
ohair@286 149 endpoint.getServiceDefinition().getPrimary().getURL() : null;
ohair@286 150 }
ohair@286 151
ohair@286 152 //
ohair@286 153 // Items from SEIModel
ohair@286 154 //
ohair@286 155
ohair@286 156 @ManagedAttribute
ohair@286 157 @Description("SEI model WSDL location")
ohair@286 158 public String seiModelWSDLLocation() {
ohair@286 159 return endpoint.getSEIModel() != null ?
ohair@286 160 endpoint.getSEIModel().getWSDLLocation() : null;
ohair@286 161 }
ohair@286 162
ohair@286 163 //
ohair@286 164 // Items from RuntimeVersion
ohair@286 165 //
ohair@286 166
ohair@286 167 @ManagedAttribute
ohair@286 168 @Description("JAX-WS runtime version")
ohair@286 169 public String jaxwsRuntimeVersion() {
ohair@286 170 return RuntimeVersion.VERSION.toString();
ohair@286 171 }
ohair@286 172
ohair@286 173 //
ohair@286 174 // Items from HttpAdapter
ohair@286 175 //
ohair@286 176
ohair@286 177 @ManagedAttribute
ohair@286 178 @Description("If true: show what goes across HTTP transport")
ohair@286 179 public boolean dumpHTTPMessages() { return HttpAdapter.dump; }
ohair@286 180
ohair@286 181
ohair@286 182 @ManagedAttribute
ohair@286 183 @Description("Show what goes across HTTP transport")
alanb@368 184 public void dumpHTTPMessages(final boolean x) { HttpAdapter.setDump(x); }
ohair@286 185
ohair@286 186 }
ohair@286 187
ohair@286 188 // End of file.

mercurial