本文整理了Java中org.apache.tuscany.sca.interfacedef.Interface.getOperations()
方法的一些代码示例,展示了Interface.getOperations()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interface.getOperations()
方法的具体详情如下:
包路径:org.apache.tuscany.sca.interfacedef.Interface
类名称:Interface
方法名:getOperations
[英]Returns the operations defined on this interface.
[中]返回在此接口上定义的操作。
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
/**
* @param intf
* @param useWrapper Use wrapper classes?
* @return
*/
private static List<DataType> getDataTypes(Interface intf, boolean useWrapper) {
List<DataType> dataTypes = new ArrayList<DataType>();
for (Operation op : intf.getOperations()) {
getDataTypes(dataTypes, op, useWrapper);
}
return dataTypes;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-databinding-jaxb
/**
* @param intf
* @param useWrapper Use wrapper classes?
* @return
*/
private static List<DataType> getDataTypes(Interface intf, boolean useWrapper) {
List<DataType> dataTypes = new ArrayList<DataType>();
for (Operation op : intf.getOperations()) {
getDataTypes(dataTypes, op, useWrapper);
}
return dataTypes;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-databinding
/**
* Get all the data types in the interface
* @param intf The interface
* @param useWrapper Use wrapper classes?
* @return A list of DataTypes
*/
public static List<DataType> getDataTypes(Interface intf, boolean useWrapper) {
List<DataType> dataTypes = new ArrayList<DataType>();
for (Operation op : intf.getOperations()) {
getDataTypes(dataTypes, op, useWrapper);
}
return dataTypes;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
/**
* Get all the data types in the interface
* @param intf The interface
* @param useWrapper Use wrapper classes?
* @return A list of DataTypes
*/
public static List<DataType> getDataTypes(Interface intf, boolean useWrapper) {
List<DataType> dataTypes = new ArrayList<DataType>();
for (Operation op : intf.getOperations()) {
getDataTypes(dataTypes, op, useWrapper);
}
return dataTypes;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime
protected boolean isOnMessage() {
InterfaceContract ic = endpointReference.getReference().getInterfaceContract();
if (ic.getInterface().getOperations().size() != 1) {
return false;
}
return "onMessage".equals(ic.getInterface().getOperations().get(0).getName());
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime
protected boolean isAsIs() {
InterfaceContract ic = service.getInterfaceContract();
if (ic.getInterface().getOperations().size() != 1) {
return false;
}
List<DataType> inputDataTypes = ic.getInterface().getOperations().get(0).getInputType().getLogical();
if (inputDataTypes.size() != 1) {
return false;
}
Class<?> inputType = inputDataTypes.get(0).getPhysical();
if (javax.jms.Message.class.isAssignableFrom(inputType)) {
return true;
}
return false;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime
protected boolean isAsIs() {
InterfaceContract ic = reference.getInterfaceContract();
if (ic.getInterface().getOperations().size() != 1) {
return false;
}
List<DataType> inputDataTypes = ic.getInterface().getOperations().get(0).getInputType().getLogical();
if (inputDataTypes.size() != 1) {
return false;
}
Class<?> inputType = inputDataTypes.get(0).getPhysical();
if (javax.jms.Message.class.isAssignableFrom(inputType)) {
return true;
}
return false;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2
private static Operation getOperation(AxisOperation axisOp,WebServiceBinding wsBinding) {
String operationName = axisOp.getName().getLocalPart();
Interface iface = wsBinding.getBindingInterfaceContract().getInterface();
for (Operation op : iface.getOperations()) {
if (op.getName().equalsIgnoreCase(operationName)) {
return op;
}
}
return null;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
protected void setIsMessageWrapped() {
if (getBindingInterfaceContract() != null) {
isMessageWrapped = getBindingInterfaceContract().getInterface().getOperations().get(0).isInputWrapperStyle();
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime
public OperationPropertiesInterceptor(JMSBinding jmsBinding, RuntimeEndpoint endpoint) {
super();
this.jmsBinding = jmsBinding;
this.service = (RuntimeComponentService) endpoint.getService();
this.serviceOperations = service.getInterfaceContract().getInterface().getOperations();
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws
protected void setIsMessageWrapped() {
if (getBindingInterfaceContract() != null) {
isMessageWrapped = getBindingInterfaceContract().getInterface().getOperations().get(0).isInputWrapperStyle();
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-http-runtime
public HTTPRPCServiceOperationSelectorInterceptor(RuntimeEndpoint endpoint) {
Interface serviceInterface = endpoint.getService().getInterfaceContract().getInterface();
this.operations = serviceInterface.getOperations();
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-http-runtime
public HTTPDefaultServiceOperationSelectorInterceptor(RuntimeEndpoint endpoint) {
Interface serviceInterface = endpoint.getService().getInterfaceContract().getInterface();
this.operations = serviceInterface.getOperations();
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime
public HeaderReferenceInterceptor(ExtensionPointRegistry extensions, JMSBinding jmsBinding,
JMSResourceFactory jmsResourceFactory, RuntimeEndpointReference runtimeWire) {
super();
this.jmsBinding = jmsBinding;
this.runtimeWire = runtimeWire;
this.requestMessageProcessor = JMSMessageProcessorUtil.getRequestMessageProcessor(extensions, jmsBinding);
this.operations = runtimeWire.getReference().getInterfaceContract().getInterface().getOperations();
} // end constructor
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-rest-runtime
public JAXRSOperationSelectorInterceptor(ExtensionPointRegistry extensionPoints, RuntimeEndpoint endpoint) {
this.extensionPoints = extensionPoints;
this.endpoint = endpoint;
this.service = (RuntimeComponentService)endpoint.getService();
this.interfaceContract = service.getInterfaceContract();
this.serviceOperations = service.getInterfaceContract().getInterface().getOperations();
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime
public OperationSelectorJMSUserPropServiceInterceptor(RuntimeEndpoint endpoint) {
super();
this.jmsBinding = (JMSBinding) endpoint.getBinding();
this.operationSelector = (OperationSelectorJMSUserProp)jmsBinding.getOperationSelector();
this.endpoint = endpoint;
this.service = (RuntimeComponentService) endpoint.getService();
this.serviceOperations = service.getInterfaceContract().getInterface().getOperations();
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-rest-runtime
public RPCOperationSelectorInterceptor(ExtensionPointRegistry extensionPoints, RuntimeEndpoint endpoint) {
this.extensionPoints = extensionPoints;
UtilityExtensionPoint utilityExtensionPoint = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
this.simpleTypeMapper = utilityExtensionPoint.getUtility(SimpleTypeMapper.class);
this.endpoint = endpoint;
this.service = (RuntimeComponentService)endpoint.getService();
this.interfaceContract = service.getInterfaceContract();
this.serviceOperations = service.getInterfaceContract().getInterface().getOperations();
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jsonp-runtime
public void start() {
ComponentService service = endpoint.getService();
Interface serviceInterface = service.getInterfaceContract().getInterface();
for (Operation op : serviceInterface.getOperations()) {
JSONPServlet servlet = new JSONPServlet(endpoint, op);
String path = endpoint.getBinding().getURI() + "/" + op.getName();
String mappedURI = servletHost.addServletMapping(path, servlet);
String endpointURI = mappedURI.substring(0, mappedURI.lastIndexOf("/" + op.getName()));
endpoint.setDeployedURI(endpointURI);
endpoint.getBinding().setURI(endpointURI);
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jsonp-runtime
public void stop() {
ComponentService service = endpoint.getService();
Interface serviceInterface = service.getInterfaceContract().getInterface();
for (Operation op : serviceInterface.getOperations()) {
String path = endpoint.getBinding().getURI() + "/" + op.getName();
servletHost.removeServletMapping(path);
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime
public OperationSelectorJMSDefaultServiceInterceptor(ExtensionPointRegistry registry, JMSResourceFactory jmsResourceFactory, RuntimeEndpoint endpoint) {
super();
this.endpint = endpoint;
this.jmsBinding = (JMSBinding) endpoint.getBinding();
this.jmsResourceFactory = jmsResourceFactory;
this.requestMessageProcessor = JMSMessageProcessorUtil.getRequestMessageProcessor(registry, jmsBinding);
this.responseMessageProcessor = JMSMessageProcessorUtil.getResponseMessageProcessor(registry, jmsBinding);
this.service = (RuntimeComponentService)endpoint.getService();
this.serviceOperations = service.getInterfaceContract().getInterface().getOperations();
this.xmlHelper = XMLHelperFactory.createXMLHelper(registry);
}
内容来源于网络,如有侵权,请联系作者删除!