- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.fabric3.spi.wire.Wire
类的一些代码示例,展示了Wire
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wire
类的具体详情如下:
包路径:org.fabric3.spi.wire.Wire
类名称:Wire
暂无
代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-ftp
private Interceptor getInterceptor() {
// lazy load the interceptor as it may not have been added when the instance was created in the wire attacher
if (interceptor == null) {
interceptor = wire.getInvocationChains().iterator().next().getHeadInterceptor();
}
return interceptor;
}
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-fabric
Wire createWire(PhysicalWireDefinition definition) throws BuilderException {
Wire wire = new WireImpl();
for (PhysicalOperationDefinition operation : definition.getOperations()) {
InvocationChain chain = new InvocationChainImpl(operation);
for (PhysicalInterceptorDefinition interceptorDefinition : operation.getInterceptors()) {
InterceptorBuilder<? super PhysicalInterceptorDefinition> builder = getBuilder(interceptorDefinition);
Interceptor interceptor = builder.build(interceptorDefinition);
chain.addInterceptor(interceptor);
}
wire.addInvocationChain(chain);
}
processTransform(wire, definition);
return wire;
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-zeromq
/**
* Returns the invocation chains for a wire in their natural order.
*
* @param wire the wire
* @return the invocation chains
*/
public static List<InvocationChain> sortChains(Wire wire) {
TreeMap<PhysicalOperationDefinition, InvocationChain> map = new TreeMap<PhysicalOperationDefinition, InvocationChain>();
for (InvocationChain chain : wire.getInvocationChains()) {
map.put(chain.getPhysicalOperation(), chain);
}
List<InvocationChain> sorted = new ArrayList<InvocationChain>();
sorted.addAll(map.values());
return sorted;
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-spring-security
public void onAttach(Wire wire) {
for (InvocationChain chain : wire.getInvocationChains()) {
SecurityContextInterceptor interceptor = new SecurityContextInterceptor();
chain.addInterceptor(interceptor);
}
}
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-rs-jersey
private void provision(RsSourceDefinition sourceDefinition, Wire wire, RsContainer container) throws ClassNotFoundException, RsContainerException {
ClassLoader classLoader = classLoaderRegistry.getClassLoader(sourceDefinition.getClassLoaderId());
Map<String, InvocationChain> invocationChains = new HashMap<String, InvocationChain>();
for (InvocationChain chain : wire.getInvocationChains()) {
PhysicalOperationDefinition operation = chain.getPhysicalOperation();
invocationChains.put(operation.getName(), chain);
}
Class<?> interfaze = classLoader.loadClass(sourceDefinition.getRsClass());
boolean authenticate = authenticate(sourceDefinition);
F3ResourceHandler handler = new F3ResourceHandler(interfaze, invocationChains, authenticate, authenticator);
// Set the class loader to the runtime one so Jersey loads the Resource config properly
ClassLoader old = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
Resource resource = createResource(handler);
container.addResource(resource);
} finally {
Thread.currentThread().setContextClassLoader(old);
}
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-ws-axis2
private void setMessageReceivers(Wire wire, AxisService axisService) throws Exception {
Map<String, InvocationChain> interceptors = new HashMap<String, InvocationChain>();
for (InvocationChain chain : wire.getInvocationChains()) {
interceptors.put(chain.getPhysicalOperation().getName(), chain);
}
Utils.fillAxisService(axisService, configurationContext.getAxisConfiguration(), null, null);
for (Iterator<?> i = axisService.getOperations(); i.hasNext();) {
AxisOperation axisOp = (AxisOperation) i.next();
InvocationChain invocationChain = interceptors.get(axisOp.getName().getLocalPart());
MessageReceiver messageReceiver = null;
if (WSDL2Constants.MEP_URI_IN_ONLY.equals(axisOp.getMessageExchangePattern()) ||
WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(axisOp.getMessageExchangePattern())) {
messageReceiver = new InOnlyServiceProxyHandler(invocationChain);
} else {//Default MEP is IN-OUT for backward compatibility
messageReceiver = new InOutServiceProxyHandler(invocationChain);
}
axisOp.setMessageReceiver(messageReceiver);
}
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-ftp
public void attach(PhysicalSourceDefinition source, FtpTargetDefinition target, Wire wire) throws WiringException {
InvocationChain invocationChain = wire.getInvocationChains().iterator().next();
URI uri = target.getUri();
try {
String host = uri.getHost();
int port = uri.getPort() == -1 ? 23 : uri.getPort();
InetAddress hostAddress = "localhost".equals(host) ? InetAddress.getLocalHost() : InetAddress.getByName(host);
String remotePath = uri.getPath();
String tmpFileSuffix = target.getTmpFileSuffix();
FtpSecurity security = target.getSecurity();
boolean active = target.isActive();
int connectTimeout = target.getConectTimeout();
SocketFactory factory = new ExpiringSocketFactory(connectTimeout);
int socketTimeout = target.getSocketTimeout();
List<String> cmds = target.getSTORCommands();
FtpTargetInterceptor targetInterceptor =
new FtpTargetInterceptor(hostAddress, port, security, active, socketTimeout, factory, cmds, monitor);
targetInterceptor.setTmpFileSuffix(tmpFileSuffix);
targetInterceptor.setRemotePath(remotePath);
invocationChain.addInterceptor(targetInterceptor);
} catch (UnknownHostException e) {
throw new WiringException(e);
}
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-ws-axis2
public void attachToTarget(PhysicalWireSourceDefinition source, Axis2WireTargetDefinition target, Wire wire) throws WiringException {
ClassLoader classLoader = classLoaderRegistry.getClassLoader(source.getClassLoaderId());
List<String> endpointUris = new LinkedList<String>();
String endpointUri = expandUri(target.getUri());
StringTokenizer tok = new StringTokenizer(endpointUri);
while (tok.hasMoreElements()) {
endpointUris.add(tok.nextToken().trim());
}
AxisService axisService = createAxisClientService(target, classLoader);
for (InvocationChain chain : wire.getInvocationChains()) {
String operation = chain.getPhysicalOperation().getName();
Set<AxisPolicy> policies = target.getPolicies(operation);
Map<String, String> opInfo = target.getOperationInfo() != null ? target.getOperationInfo().get(operation) : null;
Interceptor interceptor = new Axis2TargetInterceptor(endpointUris,
operation,
policies,
opInfo,
target.getConfig(),
f3Configurator,
policyApplier,
axisService,
classLoader);
chain.addInterceptor(interceptor);
}
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-rs-jersey
public void attach(PhysicalSourceDefinition sourceDefinition, RsTargetDefinition def, Wire wire) throws WiringException {
ClassLoader targetClassLoader = classLoaderRegistry.getClassLoader(def.getClassLoaderId());
List<InvocationChain> invocationChains = wire.getInvocationChains();
URI uri = def.getUri();
String interfaze = def.getProxyInterface();
try {
Class<?> interfaceClass = targetClassLoader.loadClass(interfaze);
for (InvocationChain chain : invocationChains) {
PhysicalOperationDefinition operation = chain.getPhysicalOperation();
String operationName = operation.getName();
List<String> targetParameterTypes = operation.getTargetParameterTypes();
Class<?> args[] = new Class<?>[targetParameterTypes.size()];
for (int i = 0; i < args.length; i++) {
args[i] = targetClassLoader.loadClass(targetParameterTypes.get(i));
}
chain.addInterceptor(new RsClientInterceptor(operationName, interfaceClass, uri, args));
}
} catch (Exception e) {
throw new WiringException(e);
}
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-spring
public void attach(PhysicalSourceDefinition source, SpringTargetDefinition target, Wire wire) throws WiringException {
String beanName = target.getBeanName();
ClassLoader loader = classLoaderRegistry.getClassLoader(target.getClassLoaderId());
Class<?> interfaze;
try {
interfaze = loader.loadClass(target.getBeanInterface());
} catch (ClassNotFoundException e) {
throw new WiringException(e);
}
for (WireListener listener : listeners) {
listener.onAttach(wire);
}
SpringComponent component = getComponent(target);
for (InvocationChain chain : wire.getInvocationChains()) {
PhysicalOperationDefinition operation = chain.getPhysicalOperation();
Method beanMethod = MethodUtils.findMethod(source, target, operation, interfaze, loader, classLoaderRegistry);
SpringInvoker invoker = new SpringInvoker(beanName, beanMethod, component);
chain.addInterceptor(invoker);
}
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-junit
public void attach(JUnitSourceDefinition source, PhysicalTargetDefinition target, Wire wire) throws WiringException {
String testName = source.getTestName();
ContextConfiguration configuration = source.getConfiguration();
if (configuration != null) {
if (authenticationService == null) {
throw new WiringException("Security information set for the test but a security extension has not been installed in the runtime");
}
// configuration an authentication interceptor to set the subject on the work context
for (InvocationChain chain : wire.getInvocationChains()) {
Interceptor next = chain.getHeadInterceptor();
String username = configuration.getUsername();
String password = configuration.getPassword();
AuthenticatingInterceptor interceptor = new AuthenticatingInterceptor(username, password, authenticationService, next);
chain.addInterceptor(0, interceptor);
}
}
holder.add(testName, wire);
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-junit
for (InvocationChain chain : wire.getInvocationChains()) {
PhysicalOperationDefinition operation = chain.getPhysicalOperation();
Method method = MethodUtils.findMethod(sourceDefinition, targetDefinition, operation, implementationClass, loader, classLoaderRegistry);
代码示例来源:origin: org.codehaus.fabric3/fabric3-fabric
ClassLoader sourceLoader = null;
ClassLoader targetLoader = null;
for (InvocationChain chain : wire.getInvocationChains()) {
if (checkPassByRef && chain.getPhysicalOperation().isAllowsPassByReference()) {
continue;
我的内部类如下: public class ClassWithInnerObject { private final InnerObject innerObject; public Class
我在 STM32F4 Discovery 上安装了 STM32F4407VGT6 Controller 。我尝试使用 SPI + DMA 从 AD7683 ADC 读取数据,但 DMA 接收缓冲区始终
假设您有一个只有一个片选的 SPI 总线。 是否有可以将 8 个或更多设备连接到该 SPI 总线的芯片? 为简化起见,您可以假设所有设备都同意 SPI 模式(数据需要在上升沿有效)。此外,所有设备都是
我有一个 32 GB 的金士顿 SDHC microSD 卡,它必须与 MSP430F2618 通信通过 SPI .我无法通过使用 CMD55 + ACMD41(bit30 设置为 1)来初始化它,如
我正在使用 chai-spies 来确保调用 Controller 中的函数,这是我的测试: it('Should show right season and analysts when compet
我刚开始进行 JS 单元测试,但很难理解如何使用 Jasmine spy 创建有意义的测试。 it('should take an array of shopping items', function
我一直在阅读 SPI 以及如何创建内核驱动程序,但我仍然不确定所有这些是如何工作的。 例如: static struct spi_driver ds1305_driver = {
这是我正在测试的代码 eventsApp.factory('userData', ['userResource', function(userResource){ return{ ge
我有一个简单的组件: .html: {{title}} Change title .ts: export class AppComponent { title = 'app works!'
当我从 SPI 总线上的 PIC-18F4520 向我的卡发出地址为 (0x00000000) 的 cmd17 时,我从命令问题中获得了正确的返回 R1 token 。然后,经过几次循环检查后,我从发
我正在使用rspec-spies我想知道在打完所有电话后是否有办法检查 spy 。 例如,如果我做类似的事情 # setup Post.stub(:find).with(@post.id).and_r
我正在使用 rspec-spies并且想知道是否有办法在所有电话都打完后检查 spy 。 例如,如果我做类似的事情 # setup Post.stub(:find).with(@post.id).an
我正在尝试制作一个可以点击另一个程序按钮的程序。我被告知我需要使用 spy++ 来获取我想要点击的按钮的 ID,所以我现在正在使用它。我找到了包含我希望从中获取按钮 ID 的按钮的窗口(窗口中有 3
问题 在我们的代码库中,我们有一个 sinon 问题,可以使用下面的代码片段重现。问题是,它似乎是间接调用的 spy 返回力 false,console.log 明确指出该方法被调用但 spy.cal
考虑以下 react 组件。 import React, { Component } from "react"; import { reduxForm, Field } from "redux-for
我正在开发一个 Linux spi 驱动程序来处理通过 SPI 端口的通信。 我的 SoC 提供了三个 spi 模块(我将其理解为端口),称为 ecspi1/ecspi2/ecspi3。 我需要使用
当我将类的方法包装成这样的 Sinon-spy 时: sinon.spy(myObject, "myMethod") spy 内部会发生什么? 我猜 spy 对象有一个指向“myObject.myMe
我正在为遗留代码编写一些 JUnit 测试,并且我非常喜欢使用注释。我想知道是否可以创建一个 spy 对象的声明,然后实例化它。我问的原因是因为我有一个带有非空构造函数的类。该构造函数的值直到测试用例
我有两个不同的设备要连接 Arduino .一个Ethernet屏蔽和轴编码器。第一个有 SPI模式 0 和第二个 SPI 模式 2。它们冲突。这个问题有解决方案吗? 我使用不同的芯片选择引脚,这两个
我正在运行使用 Yocto (Pyro) 构建的嵌入式 Linux (4.14.16)。我在具有 i.MX6DL 且 SPI 连接到 FPGA(Xilinx Artix 7)的定制板上运行。我目前正在
我是一名优秀的程序员,十分优秀!