org.apache.cxf.endpoint.Server.getDestination()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(10.4k)|赞(0)|评价(0)|浏览(64)

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

Server.getDestination介绍

暂无

代码示例

代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http

@Override
public void initialize(Server server, Bus bus) {
  Destination destination = server.getDestination();
  if (destinationConfig != null && destination instanceof AbstractHTTPDestination) {
    destinationConfig.apply((AbstractHTTPDestination)destination);
  }
}

代码示例来源:origin: apache/cxf

@Override
public void initialize(Server server, Bus bus) {
  Destination destination = server.getDestination();
  if (destinationConfig != null && destination instanceof AbstractHTTPDestination) {
    destinationConfig.apply((AbstractHTTPDestination)destination);
  }
}

代码示例来源:origin: Talend/tesb-rt-se

@Override
public void initialize(Server server, Bus bus) {
  Destination destination = server.getDestination();
  if (destination instanceof JMSDestination) {
    JMSConfiguration jmsConfig = ((JMSDestination) destination).getJmsConfig();
    updateJMSConfig(jmsConfig);
  }
}

代码示例来源:origin: apache/cxf

@Override
public void initialize(Server server, Bus bus) {
  Destination destination = server.getDestination();
  if (destination instanceof JMSDestination) {
    JMSDestination jmsDestination = (JMSDestination)destination;
    jmsDestination.getJmsConfig().setConnectionFactory(connectionFactory);
  }
  super.initialize(server, bus);
}
private class JMSConduitConfigOutInterceptor extends AbstractPhaseInterceptor<Message> {

代码示例来源:origin: org.apache.servicemix/servicemix-cxf-bc

private void registerListServiceHandler() {
  if (server.getDestination() instanceof JettyHTTPDestination) {
    JettyHTTPDestination jettyDest = (JettyHTTPDestination) server.getDestination();
    JettyHTTPServerEngine jettyEng = (JettyHTTPServerEngine) jettyDest.getEngine();
    List<Handler> handlers = jettyEng.getHandlers();
    if (handlers == null) {
      handlers = new ArrayList<Handler>();
      jettyEng.setHandlers(handlers);
    }
    handlers.add(new ListServiceHandler(((CxfBcComponent) getServiceUnit().getComponent()).getAllBuses(),
                      (CxfBcComponent) getServiceUnit().getComponent()));
  }
}

代码示例来源:origin: com.github.livesense/org.liveSense.sample.webServiceServlet

private String getServletInfo() {
  return "Context Path info: "+(servletRequest != null ? servletRequest.getPathInfo(): "NO CONTEXT REQUEST")+" "+
  "Filter therad local request Path info: "+(WebServiceThreadLocalRequestFilter.getThreadLocalRequest() != null ? WebServiceThreadLocalRequestFilter.getThreadLocalRequest().getPathInfo() : "NO THREADLOCAL REQUEST")+" "+
  "Filter thread Local request Server Address info: "+(WebServiceThreadLocalRequestFilter.getWebServiceServer() != null ? WebServiceThreadLocalRequestFilter.getWebServiceServer().getDestination().getAddress().getAddress().getValue() : "NO CXF SERVER");
}

代码示例来源:origin: com.github.livesense/org.liveSense.sample.webServiceServlet

private String getServletInfo() {
  return "Context Path info: "+(getRequest() != null ? getRequest().getPathInfo(): "NO CONTEXT REQUEST")+" "+
  "Filter therad local request Path info: "+(WebServiceThreadLocalRequestFilter.getThreadLocalRequest() != null ? WebServiceThreadLocalRequestFilter.getThreadLocalRequest().getPathInfo() : "NO THREADLOCAL REQUEST")+" "+
  "Filter thread Local request Server Address info: "+(WebServiceThreadLocalRequestFilter.getWebServiceServer() != null ? WebServiceThreadLocalRequestFilter.getWebServiceServer().getDestination().getAddress().getAddress().getValue() : "NO CXF SERVER");
}

代码示例来源:origin: com.github.livesense/org.liveSense.sample.webServiceServlet

private String getServletInfo() {
  return "Context Path info: "+(getRequest() != null ? getRequest().getPathInfo(): "NO CONTEXT REQUEST")+" "+
  "Filter therad local request Path info: "+(WebServiceThreadLocalRequestFilter.getThreadLocalRequest() != null ? WebServiceThreadLocalRequestFilter.getThreadLocalRequest().getPathInfo() : "NO THREADLOCAL REQUEST")+" "+
  "Filter thread Local request Server Address info: "+(WebServiceThreadLocalRequestFilter.getWebServiceServer() != null ? WebServiceThreadLocalRequestFilter.getWebServiceServer().getDestination().getAddress().getAddress().getValue() : "NO CXF SERVER");
}

代码示例来源:origin: apache/cxf

private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                  Bus bus) {
  MultiplexDestination destination = null;
  ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class);
  if (null != serverRegistry) {
    List<Server> servers = serverRegistry.getServers();
    for (Server s : servers) {
      QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
      if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
        Destination dest = s.getDestination();
        if (dest instanceof MultiplexDestination) {
          destination = (MultiplexDestination)dest;
          break;
        }
      }
    }
  } else {
    LOG.log(Level.WARNING,
        "Failed to locate service matching " + serviceQName
        + ", because the bus ServerRegistry extension provider is null");
  }
  return destination;
}

代码示例来源:origin: org.apache.cxf/cxf-core

private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                  Bus bus) {
  MultiplexDestination destination = null;
  ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class);
  if (null != serverRegistry) {
    List<Server> servers = serverRegistry.getServers();
    for (Server s : servers) {
      QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
      if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
        Destination dest = s.getDestination();
        if (dest instanceof MultiplexDestination) {
          destination = (MultiplexDestination)dest;
          break;
        }
      }
    }
  } else {
    LOG.log(Level.WARNING,
        "Failed to locate service matching " + serviceQName
        + ", because the bus ServerRegistry extension provider is null");
  }
  return destination;
}

代码示例来源:origin: org.apache.cxf/cxf-api

private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                  Bus bus) {
  MultiplexDestination destination = null;
  ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class);
  if (null != serverRegistry) {
    List<Server> servers = serverRegistry.getServers();
    for (Server s : servers) {
      QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
      if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
        Destination dest = s.getDestination();
        if (dest instanceof MultiplexDestination) {
          destination = (MultiplexDestination)dest;
          break;
        }
      }
    }
  } else {
    LOG.log(Level.WARNING,
        "Failed to locate service matching " + serviceQName 
        + ", because the bus ServerRegistry extension provider is null");
  }
  return destination;
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

private static MultiplexDestination getMatchingMultiplexDestination(QName serviceQName, String portName,
                                  Bus bus) {
  MultiplexDestination destination = null;
  ServerRegistry serverRegistry = bus.getExtension(ServerRegistry.class);
  if (null != serverRegistry) {
    List<Server> servers = serverRegistry.getServers();
    for (Server s : servers) {
      QName targetServiceQName = s.getEndpoint().getEndpointInfo().getService().getName();
      if (serviceQName.equals(targetServiceQName) && portNameMatches(s, portName)) {
        Destination dest = s.getDestination();
        if (dest instanceof MultiplexDestination) {
          destination = (MultiplexDestination)dest;
          break;
        }
      }
    }
  } else {
    LOG.log(Level.WARNING,
        "Failed to locate service matching " + serviceQName 
        + ", because the bus ServerRegistry extension provider is null");
  }
  return destination;
}

代码示例来源:origin: apache/cxf

@Override
public void initialize(Server server, Bus bus) {
  checkJmsConfig();
  Destination destination = server.getDestination();
  if (!(destination instanceof JMSDestination)) {
    throw new ConfigurationException(new Message("JMSCONFIGFEATURE_ONLY_JMS", LOG));
  }
  JMSDestination jmsDestination = (JMSDestination)destination;
  jmsDestination.setJmsConfig(jmsConfig);
  super.initialize(server, bus);
}

代码示例来源:origin: org.apache.servicemix/servicemix-cxf-bc

private void checkJmsTransportTransaction() {
  Destination destination = server.getDestination();
  if (destination instanceof JMSDestination) {
    JMSDestination jmsDestination = (JMSDestination)destination;
    JMSConfiguration jmsConfig = jmsDestination.getJmsConfig();
    if (jmsConfig.isSessionTransacted()) {
      TransactionManager tm = (TransactionManager) getContext().getTransactionManager();
      if (tm == null) {
        throw new IllegalStateException("No TransactionManager available");
      } else if (tm instanceof PlatformTransactionManager) {
        jmsConfig.setSessionTransacted(true);
        jmsConfig.setTransactionManager((PlatformTransactionManager)tm);
        jmsConfig.setUseJms11(false);
        setSynchronous(true);
        transactionEnabled = true;
      }
    }
  } 
  
}

代码示例来源:origin: org.apache.openejb/openejb-cxf-rs

destination = (AbstractHTTPDestination) server.getDestination();
  fireServerCreated(oldLoader);
} finally {

代码示例来源:origin: Talend/tesb-rt-se

private static Server startApplication(Application app) {
  RuntimeDelegate delegate = RuntimeDelegate.getInstance();
  JAXRSServerFactoryBean bean = delegate.createEndpoint(app, JAXRSServerFactoryBean.class);
  
  
  
  bean.setAddress("http://localhost:8080" + bean.getAddress());
  bean.setStart(false);
  Server server = bean.create();
  JettyHTTPDestination dest = (JettyHTTPDestination)server.getDestination();
  JettyHTTPServerEngine engine = (JettyHTTPServerEngine)dest.getEngine();
  engine.setSessionSupport(true);
  
  server.start();
  return server;
}

代码示例来源:origin: Talend/tesb-rt-se

private static Server startApplication(Application app) {
  RuntimeDelegate delegate = RuntimeDelegate.getInstance();
  JAXRSServerFactoryBean bean = delegate.createEndpoint(app, JAXRSServerFactoryBean.class);
  
  
  
  bean.setAddress("http://localhost:8080" + bean.getAddress());
  bean.setStart(false);
  Server server = bean.create();
  JettyHTTPDestination dest = (JettyHTTPDestination)server.getDestination();
  JettyHTTPServerEngine engine = (JettyHTTPServerEngine)dest.getEngine();
  engine.setSessionSupport(true);
  
  server.start();
  return server;
}

代码示例来源:origin: org.talend.esb/locator

Destination destination = server.getDestination();
EndpointPolicy ep = pe.getServerEndpointPolicy(ei, destination, null);
Collection<Assertion> assertions = ep.getChosenAlternative();

代码示例来源:origin: Talend/tesb-rt-se

Destination destination = server.getDestination();
EndpointPolicy ep = pe.getServerEndpointPolicy(ei, destination, null);
Collection<Assertion> assertions = ep.getChosenAlternative();

代码示例来源:origin: com.tomitribe.tribestream/tribestream-container

final String baseUrl = server.getDestination().getAddress().getAddress().getValue();

相关文章