org.jboss.wsf.spi.deployment.Endpoint.getName()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(8.3k)|赞(0)|评价(0)|浏览(177)

本文整理了Java中org.jboss.wsf.spi.deployment.Endpoint.getName()方法的一些代码示例,展示了Endpoint.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Endpoint.getName()方法的具体详情如下:
包路径:org.jboss.wsf.spi.deployment.Endpoint
类名称:Endpoint
方法名:getName

Endpoint.getName介绍

[英]Get the unique identifier for this endpoint
[中]获取此终结点的唯一标识符

代码示例

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

private String getContext(final Endpoint endpoint) {
  return endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
}

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

private String getName(final Endpoint endpoint) {
  return endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
}

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

private String getContext(final Endpoint endpoint) {
  return endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
}

代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration

private String getName(final Endpoint endpoint) {
  return endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

private String getName(final Endpoint endpoint) {
  return endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
}

代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration

private String getContext(final Endpoint endpoint) {
  return endpoint.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
}

代码示例来源:origin: org.jboss.ws/jbossws-framework

public void unregister(Endpoint endpoint)
  {
   if (endpoint == null)
     throw new IllegalArgumentException("Endpoint cannot be null");

   ObjectName epName = endpoint.getName();
   if (isRegistered(epName) == false)
     throw new IllegalStateException("Endpoint not registered: " + epName);

   log.info("remove: " + epName);
   endpoints.remove(epName);
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-framework

public void register(Endpoint endpoint)
{
 if (endpoint == null)
   throw new IllegalArgumentException("Endpoint cannot be null");
 ObjectName epName = endpoint.getName();
 if (epName == null)
   throw new IllegalStateException("Endpoint name cannot be null for: " + endpoint);
 if (isRegistered(epName))
   throw new IllegalStateException("Endpoint already registered: " + epName);
 log.info("register: " + epName);
 endpoints.put(epName, endpoint);
}

代码示例来源:origin: org.jboss.ws/jbossws-framework

private void unregisterRecordProcessor(RecordProcessor processor, Endpoint ep)
{
 try
 {
   mbeanServer.unregisterMBean(ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
 }
 catch (JMException ex)
 {
   log.error("Cannot unregister record processor with JMX server", ex);
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-framework

@Override
public void unregister(Endpoint endpoint)
{
 super.unregister(endpoint);
 try
 {
   if (getMbeanServer() != null)
    getMbeanServer().unregisterMBean(endpoint.getName());
   else
    log.warn("MBeanServer not available, cannot unregister endpoint with JMX server");
 }
 catch (JMException ex)
 {
   log.error("Cannot unregister endpoint with JMX server", ex);
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-framework

@Override
public void register(Endpoint endpoint)
{
 super.register(endpoint);
 try
 {
   ManagedEndpoint jmxEndpoint = new ManagedEndpoint(endpoint, mbeanServer);
   getMbeanServer().registerMBean(jmxEndpoint, endpoint.getName());
 }
 catch (Exception ex)
 {
   log.error("Cannot register endpoint with JMX server", ex);
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-common

private void unregisterRecordProcessor(RecordProcessor processor, Endpoint ep)
{
 final ObjectName on = ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName());
 try
 {
   mbeanServer.unregisterMBean(on);
 }
 catch (JMException ex)
 {
   Loggers.MANAGEMENT_LOGGER.cannotUnregisterProcessorWithJmxServer(on, ex);
 }
}

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

private void unregisterRecordProcessor(final RecordProcessor processor, final Endpoint ep) {
  MBeanServer mbeanServer = serverConfigService.get().getMbeanServer();
  if (mbeanServer != null) {
    try {
      mbeanServer.unregisterMBean(ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
    } catch (final JMException e) {
      WSLogger.ROOT_LOGGER.cannotUnregisterRecordProcessor();
    }
  } else {
    WSLogger.ROOT_LOGGER.mBeanServerNotAvailable(processor);
  }
}

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

private void unregisterEndpoint(final Endpoint endpoint) {
  MBeanServer mbeanServer = serverConfigService.get().getMbeanServer();
  if (mbeanServer != null) {
    try {
      mbeanServer.unregisterMBean(endpoint.getName());
    } catch (final JMException ex) {
      WSLogger.ROOT_LOGGER.trace("Cannot unregister endpoint from JMX server", ex);
      WSLogger.ROOT_LOGGER.cannotUnregisterEndpoint(endpoint.getShortName());
    }
  } else {
    WSLogger.ROOT_LOGGER.mBeanServerNotAvailable(endpoint.getShortName());
  }
}

代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration

private void unregisterRecordProcessor(final RecordProcessor processor, final Endpoint ep) {
  MBeanServer mbeanServer = mBeanServerValue.getValue();
  if (mbeanServer != null) {
    try {
      mbeanServer.unregisterMBean(ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
    } catch (final JMException e) {
      ROOT_LOGGER.cannotUnregisterRecordProcessor();
    }
  } else {
    ROOT_LOGGER.mBeanServerNotAvailable(processor);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

private void unregisterRecordProcessor(final RecordProcessor processor, final Endpoint ep) {
  MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
  if (mbeanServer != null) {
    try {
      mbeanServer.unregisterMBean(ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
    } catch (final JMException e) {
      WSLogger.ROOT_LOGGER.cannotUnregisterRecordProcessor();
    }
  } else {
    WSLogger.ROOT_LOGGER.mBeanServerNotAvailable(processor);
  }
}

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

private void registerEndpoint(final Endpoint endpoint) {
  MBeanServer mbeanServer = serverConfigService.get().getMbeanServer();
  if (mbeanServer != null) {
    try {
      ManagedEndpoint jmxEndpoint = new ManagedEndpoint(endpoint, mbeanServer);
      mbeanServer.registerMBean(jmxEndpoint, endpoint.getName());
    } catch (final JMException ex) {
      WSLogger.ROOT_LOGGER.trace("Cannot register endpoint in JMX server", ex);
      WSLogger.ROOT_LOGGER.cannotRegisterEndpoint(endpoint.getShortName());
    }
  } else {
    WSLogger.ROOT_LOGGER.mBeanServerNotAvailable(endpoint.getShortName());
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

private void unregisterEndpoint(final Endpoint ep) {
  MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
  if (mbeanServer != null) {
    try {
      mbeanServer.unregisterMBean(endpoint.getName());
    } catch (final JMException ex) {
      WSLogger.ROOT_LOGGER.trace("Cannot unregister endpoint from JMX server", ex);
      WSLogger.ROOT_LOGGER.cannotUnregisterEndpoint(endpoint.getShortName());
    }
  } else {
    WSLogger.ROOT_LOGGER.mBeanServerNotAvailable(endpoint.getShortName());
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

private void registerEndpoint(final Endpoint ep) {
  MBeanServer mbeanServer = serverConfigServiceValue.getValue().getMbeanServer();
  if (mbeanServer != null) {
    try {
      ManagedEndpoint jmxEndpoint = new ManagedEndpoint(endpoint, mbeanServer);
      mbeanServer.registerMBean(jmxEndpoint, endpoint.getName());
    } catch (final JMException ex) {
      WSLogger.ROOT_LOGGER.trace("Cannot register endpoint in JMX server", ex);
      WSLogger.ROOT_LOGGER.cannotRegisterEndpoint(endpoint.getShortName());
    }
  } else {
    WSLogger.ROOT_LOGGER.mBeanServerNotAvailable(endpoint.getShortName());
  }
}

代码示例来源:origin: org.jboss.ws.native/jbossws-native-core

private void handleWSDLRequest(Endpoint endpoint, OutputStream outputStream, String resPath, URL reqURL) throws MalformedURLException, IOException
{
 ServerEndpointMetaData epMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
 if (epMetaData == null)
   throw MESSAGES.cannotObtainEndpointMetaData(endpoint.getName());
 
 //The WSDLFilePublisher should set the location to an URL 
 URL wsdlLocation = epMetaData.getServiceMetaData().getWsdlLocation();
 String wsdlPublishLoc = epMetaData.getServiceMetaData().getWsdlPublishLocation();
 WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(wsdlLocation, wsdlPublishLoc, AbstractServerConfig.getServerIntegrationServerConfig());
 Document document = wsdlRequestHandler.getDocumentForPath(reqURL, resPath);
 OutputStreamWriter writer = new OutputStreamWriter(outputStream);
 new DOMWriter(writer, Constants.DEFAULT_XML_CHARSET).setPrettyprint(true).print(document);
}

相关文章