1 23 24 package com.sun.enterprise.management.ext.wsmgmt; 25 26 import java.util.Map ; 27 import java.util.HashMap ; 28 import java.util.HashSet ; 29 import java.util.Set ; 30 import java.util.Iterator ; 31 32 import java.io.Serializable ; 33 34 import javax.management.ObjectName ; 35 36 import com.sun.appserv.management.base.AMX; 37 import com.sun.appserv.management.base.Util; 38 import com.sun.appserv.management.base.XTypes; 39 40 import com.sun.appserv.management.j2ee.J2EETypes; 41 42 import com.sun.appserv.management.util.jmx.JMXUtil; 43 import com.sun.appserv.management.util.misc.TypeCast; 44 45 import com.sun.appserv.management.ext.wsmgmt.WebServiceMgr; 46 import com.sun.appserv.management.ext.wsmgmt.WebServiceEndpointInfo; 47 48 import com.sun.enterprise.management.support.AMXImplBase; 49 50 import com.sun.enterprise.admin.wsmgmt.WebServiceMgrBackEnd; 51 52 53 54 59 public class WebServiceMgrImpl extends AMXImplBase 60 { 62 65 public WebServiceMgrImpl() { 66 } 67 68 73 public final String getGroup() { 74 return( AMX.GROUP_OTHER ); 75 } 76 77 84 public Map <Object ,String > getWebServiceEndpointKeys() 85 { 86 final Map <?,?> m = WebServiceMgrBackEnd.getManager().getWebServicesMap(); 87 88 final Map <Object ,String > result = 89 TypeCast.checkMap( m, Object .class, String .class ); 90 91 return result; 92 } 93 94 101 public Map <String , Serializable > 102 getWebServiceEndpointInfo(Object name) 103 { 104 if ( name instanceof String ) 105 { 106 return TypeCast.asMap( 107 WebServiceMgrBackEnd.getManager().getWebServiceInfoMap((String )name) ); 108 } 109 else 110 { 111 throw new IllegalArgumentException (); 112 } 113 } 114 115 116 117 126 public Set <ObjectName > getWebServiceEndpointObjectNameSet( 127 Object webServiceInfoKey , String sName) { 128 129 String objNamePat = WebServiceMgrBackEnd.getManager(). 130 getWebServiceEndpointObjectNames(webServiceInfoKey, sName); 131 if (objNamePat == null) { 132 return new HashSet <ObjectName >(); 133 } else { 134 return getQueryMgr().queryPropsObjectNameSet(objNamePat); 135 } 136 } 137 138 141 public String [] listRegistryLocations() { 142 return WebServiceMgrBackEnd.getManager().listRegistryLocations(); 143 } 144 145 168 public void publishToRegistry(String [] registryLocations, 169 Object webServiceEndpointKey, Map <String ,String > optional) { 170 WebServiceMgrBackEnd.getManager(). 171 publishToRegistry(registryLocations, webServiceEndpointKey, 172 optional); 173 } 174 175 185 public void unpublishFromRegistry(String [] registryLocations, 186 Object webServiceEndpointKey) { 187 WebServiceMgrBackEnd.getManager(). 188 unpublishFromRegistry(registryLocations, 189 webServiceEndpointKey); 190 } 191 199 public void removeRegistryConnectionResources(String jndiNameOfRegistry){ 200 WebServiceMgrBackEnd.getManager().removeRegistryConnectionResources(jndiNameOfRegistry); 201 } 202 225 public void addRegistryConnectionResources(String jndiName, 226 String description, String type , Map <String , String > properties) { 227 WebServiceMgrBackEnd.getManager(). 228 addRegistryConnectionResources(jndiName, description, type, properties); 229 } 230 } 231 232 | Popular Tags |