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

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

本文整理了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

  1. /**
  2. * Indicates if the invocation is for the callback of a bidirectional service
  3. * @param msg the Message
  4. * @return true if the invocation is for the callback of a bidirectional service, false otherwise
  5. */
  6. private boolean isInvocationForCallback( Message msg ) {
  7. org.apache.tuscany.sca.assembly.EndpointReference fromEPR = msg.getFrom();
  8. if( fromEPR != null ) {
  9. ComponentReference ref = fromEPR.getReference();
  10. if( ref != null ) return ref.isForCallback();
  11. } // end if
  12. return false;
  13. } // end method isInvocationForCallback

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

  1. /**
  2. * Indicates if the invocation is for the callback of a bidirectional
  3. * service
  4. *
  5. * @param msg the Message
  6. * @return true if the invocation is for the callback of a bidirectional
  7. * service, false otherwise
  8. */
  9. private boolean isInvocationForCallback(Message msg) {
  10. org.apache.tuscany.sca.assembly.EndpointReference fromEPR = msg.getFrom();
  11. if (fromEPR != null) {
  12. ComponentReference ref = fromEPR.getReference();
  13. if (ref != null)
  14. return ref.isForCallback();
  15. } // end if
  16. return false;
  17. } // end method isInvocationForCallback

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

  1. public Message invoke(Message msg) {
  2. try {
  3. if( isCallback ) {
  4. // Extract the callback endpoint metadata
  5. callbackEPR = msg.getFrom();
  6. } // end if
  7. Object[] args = msg.getBody();
  8. Object resp = doTheWork(args);
  9. msg.setBody(resp);
  10. } catch (InvocationTargetException e) {
  11. msg.setFaultBody(e.getCause());
  12. }
  13. return msg;
  14. }

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

  1. protected Destination getRequestDestination(org.apache.tuscany.sca.invocation.Message tuscanyMsg, Session session) throws JMSBindingException, NamingException, JMSException {
  2. Destination requestDestination = null;
  3. if (endpointReference.getReference().isForCallback()) {
  4. // Check if the CallbackDestinationInterceptor set a callback destination from the request msg
  5. if (tuscanyMsg.getFrom().getTargetEndpoint() != null) {
  6. if (tuscanyMsg.getFrom().getTargetEndpoint().getBinding() != null) {
  7. this.jmsBinding = (JMSBinding)tuscanyMsg.getFrom().getTargetEndpoint().getBinding();
  8. /* TUSCANY-4011 - we could delay until this point until setting the callback destination
  9. CallbackHandler callbackHandler = (CallbackHandler)tuscanyMsg.getHeaders().get(Constants.CALLBACK);
  10. if (callbackHandler != null && callbackHandler.getCallbackTargetURI() != null){
  11. this.jmsBinding.setDestinationName(callbackHandler.getCallbackTargetURI());
  12. }
  13. */
  14. requestDestination = lookupDestination();
  15. }
  16. }
  17. }
  18. if (requestDestination == null) {
  19. requestDestination = bindingRequestDest;
  20. }
  21. return requestDestination;
  22. }

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

  1. EndpointReference from = msg.getFrom();

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

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

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

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

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

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

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

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

相关文章