本文整理了Java中org.jboss.wsf.spi.deployment.Endpoint.getShortName()
方法的一些代码示例,展示了Endpoint.getShortName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Endpoint.getShortName()
方法的具体详情如下:
包路径:org.jboss.wsf.spi.deployment.Endpoint
类名称:Endpoint
方法名:getShortName
[英]Get the short name for this endpoint
[中]获取此终结点的短名称
代码示例来源:origin: org.jboss.ws/jbossws-framework
protected String getImplicitPattern(Deployment dep, Endpoint ep)
{
// #4 Fallback to the ejb-name
String urlPattern = ep.getShortName();
return urlPattern;
}
代码示例来源:origin: org.jboss.ws/jbossws-framework
public Endpoint getEndpointByName(String shortName)
{
Endpoint retEndpoint = null;
for (Endpoint ep : endpoints)
{
if (ep.getShortName().equals(shortName))
{
retEndpoint = ep;
break;
}
}
return retEndpoint;
}
代码示例来源:origin: org.jboss.ws/jbossws-common
public Endpoint getEndpointByName(String shortName)
{
Endpoint retEndpoint = null;
for (Endpoint ep : endpoints)
{
if (ep.getShortName().equals(shortName))
{
retEndpoint = ep;
break;
}
}
return retEndpoint;
}
代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration
private InjectionAwareInstanceProvider(final InstanceProvider delegate, final Endpoint endpoint, final DeploymentUnit unit) {
this.delegate = delegate;
endpointName = endpoint.getShortName();
endpointClass = endpoint.getTargetBeanName();
componentPrefix = unit.getServiceName().append("component");
}
代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration
private InjectionAwareInstanceProvider(final InstanceProvider delegate, final Endpoint endpoint, final DeploymentUnit unit) {
this.delegate = delegate;
endpointName = endpoint.getShortName();
endpointClass = endpoint.getTargetBeanName();
componentPrefix = unit.getServiceName().append("component");
}
代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration
private InjectionAwareInstanceProvider(final InstanceProvider delegate, final Endpoint endpoint, final DeploymentUnit unit) {
this.delegate = delegate;
endpointName = endpoint.getShortName();
endpointClass = endpoint.getTargetBeanName();
componentPrefix = unit.getServiceName().append("component");
}
代码示例来源:origin: org.jboss.ws/jbossws-common
private String getUrlPattern(Deployment dep, Endpoint ep)
{
String urlPattern = null;
EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName()) != null)
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
urlPattern = bmd.getPortComponentURI();
}
return urlPattern;
}
}
代码示例来源:origin: org.jboss.ws/jbossws-framework
private String getUrlPattern(Deployment dep, Endpoint ep)
{
String urlPattern = null;
EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName()) != null)
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
urlPattern = bmd.getPortComponentURI();
}
return urlPattern;
}
}
代码示例来源: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.wildfly/wildfly-webservices-server-integration
static List<ServiceName> getServiceNamesFromDeploymentUnit(final DeploymentUnit unit) {
final List<ServiceName> endpointServiceNames = new ArrayList<>();
Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);
for (Endpoint ep : deployment.getService().getEndpoints()) {
endpointServiceNames.add(EndpointService.getServiceName(unit, ep.getShortName()));
}
return endpointServiceNames;
}
代码示例来源: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.ws/jbossws-common
@Override
public void start(Deployment dep)
{
final String contextRoot = dep.getService().getContextRoot();
if (contextRoot == null || contextRoot.startsWith("/") == false)
throw Messages.MESSAGES.contextRootExpectedToStartWithLeadingSlash(contextRoot);
for (Endpoint ep : dep.getService().getEndpoints())
{
final StringBuilder name = new StringBuilder(Endpoint.SEPID_DOMAIN + ":");
name.append(Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextRoot.substring(1) + ",");
name.append(Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ep.getShortName());
ep.setName(ObjectNameFactory.create(name.toString()));
}
}
代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration
public static void uninstall(final Endpoint endpoint, final DeploymentUnit unit) {
final ServiceName serviceName = getServiceName(unit, endpoint.getShortName());
final ServiceController<?> endpointService = currentServiceContainer().getService(serviceName);
if (endpointService != null) {
endpointService.setMode(Mode.REMOVE);
}
}
代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration
public static void uninstall(final Endpoint endpoint, final DeploymentUnit unit) {
final ServiceName serviceName = getServiceName(unit, endpoint.getShortName());
final ServiceController<?> endpointService = WSServices.getContainerRegistry().getService(serviceName);
if (endpointService != null) {
endpointService.setMode(Mode.REMOVE);
}
}
代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration
public static void uninstall(final Endpoint endpoint, final DeploymentUnit unit) {
final ServiceName serviceName = getServiceName(unit, endpoint.getShortName());
final ServiceController<?> endpointService = currentServiceContainer().getService(serviceName);
if (endpointService != null) {
endpointService.setMode(Mode.REMOVE);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration
/**
* Gets EJB security meta data if associated with EJB endpoint.
*
* @param endpoint EJB webservice endpoint
* @return EJB security meta data or null
*/
private EJBSecurityMetaData getEjbSecurityMetaData(final Endpoint endpoint) {
final String ejbName = endpoint.getShortName();
final Deployment dep = endpoint.getService().getDeployment();
final EJBArchiveMetaData ejbArchiveMD = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
final EJBMetaData ejbMD = ejbArchiveMD != null ? ejbArchiveMD.getBeanByEjbName(ejbName) : null;
return ejbMD != null ? ejbMD.getSecurityMetaData() : null;
}
代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration
/**
* Gets EJB security meta data if associated with EJB endpoint.
*
* @param endpoint EJB webservice endpoint
* @return EJB security meta data or null
*/
private EJBSecurityMetaData getEjbSecurityMetaData(final Endpoint endpoint) {
final String ejbName = endpoint.getShortName();
final Deployment dep = endpoint.getService().getDeployment();
final EJBArchiveMetaData ejbArchiveMD = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
final EJBMetaData ejbMD = ejbArchiveMD != null ? ejbArchiveMD.getBeanByEjbName(ejbName) : null;
return ejbMD != null ? ejbMD.getSecurityMetaData() : null;
}
代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration
/**
* Gets EJB security meta data if associated with EJB endpoint.
*
* @param endpoint EJB webservice endpoint
* @return EJB security meta data or null
*/
private EJBSecurityMetaData getEjbSecurityMetaData(final Endpoint endpoint) {
final String ejbName = endpoint.getShortName();
final Deployment dep = endpoint.getService().getDeployment();
final EJBArchiveMetaData ejbArchiveMD = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
final EJBMetaData ejbMD = ejbArchiveMD != null ? ejbArchiveMD.getBeanByEjbName(ejbName) : null;
return ejbMD != null ? ejbMD.getSecurityMetaData() : null;
}
代码示例来源:origin: org.jboss.ws/jbossws-jboss423x
public void init(Endpoint ep)
{
String ejbName = ep.getShortName();
ArchiveDeployment dep = (ArchiveDeployment)ep.getService().getDeployment();
String nameStr = "jboss.j2ee:name=" + ejbName + ",service=EJB3,jar=" + dep.getSimpleName();
if (dep.getParent() != null)
{
nameStr += ",ear=" + dep.getParent().getSimpleName();
}
objectName = ObjectNameFactory.create(nameStr.toString());
Dispatcher dispatcher = Dispatcher.singleton;
if (dispatcher.getRegistered(objectName.getCanonicalName()) == null)
throw new WebServiceException("Cannot find service endpoint target: " + objectName);
}
内容来源于网络,如有侵权,请联系作者删除!