org.apache.tuscany.sca.invocation.Message.getFrom()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(207)

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

Message.getFrom介绍

[英]Get the end point reference of the source reference
[中]获取源引用的端点引用

代码示例

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

/**
 * Indicates if the invocation is for the callback of a bidirectional service
 * @param msg the Message
 * @return true if the invocation is for the callback of a bidirectional service, false otherwise
 */
private boolean isInvocationForCallback( Message msg ) {
  org.apache.tuscany.sca.assembly.EndpointReference fromEPR = msg.getFrom();
  if( fromEPR != null ) {
    ComponentReference ref = fromEPR.getReference();
    if( ref != null ) return ref.isForCallback();
  } // end if
  return false;
} // end method isInvocationForCallback

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

/**
 * Indicates if the invocation is for the callback of a bidirectional
 * service
 * 
 * @param msg the Message
 * @return true if the invocation is for the callback of a bidirectional
 *         service, false otherwise
 */
private boolean isInvocationForCallback(Message msg) {
  org.apache.tuscany.sca.assembly.EndpointReference fromEPR = msg.getFrom();
  if (fromEPR != null) {
    ComponentReference ref = fromEPR.getReference();
    if (ref != null)
      return ref.isForCallback();
  } // end if
  return false;
} // end method isInvocationForCallback

代码示例来源:origin: org.apache.tuscany.sca/tuscany-implementation-bpel-runtime

public Message invoke(Message msg) {
  try {
    if( isCallback ) {
      // Extract the callback endpoint metadata
      callbackEPR = msg.getFrom();
    } // end if
    Object[] args = msg.getBody();
    Object resp = doTheWork(args);
    msg.setBody(resp);
  } catch (InvocationTargetException e) {
    msg.setFaultBody(e.getCause());
  }
  return msg;
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime

protected Destination getRequestDestination(org.apache.tuscany.sca.invocation.Message tuscanyMsg, Session session) throws JMSBindingException, NamingException, JMSException {
    Destination requestDestination = null;

    if (endpointReference.getReference().isForCallback()) {
      
      // Check if the CallbackDestinationInterceptor set a callback destination from the request msg
      if (tuscanyMsg.getFrom().getTargetEndpoint() != null) {
        if (tuscanyMsg.getFrom().getTargetEndpoint().getBinding() != null) {
          this.jmsBinding = (JMSBinding)tuscanyMsg.getFrom().getTargetEndpoint().getBinding();
          
/* TUSCANY-4011 - we could delay until this point until setting the callback destination                    
          CallbackHandler callbackHandler = (CallbackHandler)tuscanyMsg.getHeaders().get(Constants.CALLBACK);
          if (callbackHandler != null && callbackHandler.getCallbackTargetURI() != null){
            this.jmsBinding.setDestinationName(callbackHandler.getCallbackTargetURI());
          }
*/                    
          requestDestination = lookupDestination();
        }
      }
    }
    
    if (requestDestination == null) {
      requestDestination = bindingRequestDest;
    }

    return requestDestination;
  }

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

EndpointReference from = msg.getFrom();

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

if (msgContext.getFrom() != null){
  resolvedEndpoint = msgContext.getFrom().getCallbackEndpoint();

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

msg.setTo(callbackEndpoint);
} else {
  callbackEndpoint = msg.getFrom().getCallbackEndpoint();

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

protected void setHeaders(SOAPHeader sh, Message msg, String action) throws SOAPException {
  Endpoint callbackEndpoint = msg.getFrom().getCallbackEndpoint();

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-jms-runtime

if (tuscanyMsg.getFrom().getCallbackEndpoint() != null) {

相关文章