@Override public String getFlowStepEndpointName() { return this.messageExchange.getEndpoint().getEndpointName(); }
@Override public String getFlowStepServiceName() { return String.valueOf(this.messageExchange.getEndpoint().getServiceName()); }
public MessageTrackingInfo(final MessageExchange exchange, final String comment) { this.me = exchange; this.comment = comment; this.date = Calendar.getInstance().getTime(); try { this.inMessage = NormalizedMessageUtil.getInMessageCopy(me); } catch (TransformerConfigurationException ex) { Logger.getLogger(MessageTrackingInfo.class.getName()).log(Level.SEVERE, null, ex); } try { this.outMessage = NormalizedMessageUtil.getOutMessageCopy(me); } catch (TransformerConfigurationException ex) { Logger.getLogger(MessageTrackingInfo.class.getName()).log(Level.SEVERE, null, ex); } try { this.faultMessage = NormalizedMessageUtil.getFaultMessageCopy(me); } catch (TransformerConfigurationException ex) { Logger.getLogger(MessageTrackingInfo.class.getName()).log(Level.SEVERE, null, ex); } this.endpoint = me.getEndpoint(); this.status = me.getStatus(); }
public WrappedRequestToProviderMessage(MessageExchange messageExchange) { super(messageExchange); ServiceEndpoint mockServiceEndpoint = Mockito.mock(ServiceEndpoint.class); ServiceEndpoint endpoint = messageExchange.getEndpoint(); String endpointName = null; if (endpoint != null) { endpointName = endpoint.getEndpointName(); } QName serviceName = messageExchange.getService(); when(mockServiceEndpoint.getEndpointName()).thenReturn(endpointName); when(mockServiceEndpoint.getServiceName()).thenReturn(serviceName); messageExchange.setEndpoint(mockServiceEndpoint); setRole(Role.PROVIDER); }
@Override public void send(final MessageExchange messageExchange) throws MessagingException { if (messageExchange.getEndpoint() == null) { resolveEndpoint(messageExchange); } final MessageExchangeWrapper msgExchange = (MessageExchangeWrapper) messageExchange; try { if (messageExchange.getRole().equals(Role.PROVIDER)) { this.responsesToClientQueue.put(msgExchange.getMessageExchange()); } else { this.requestsToServerQueue.put(msgExchange.getMessageExchange()); } } catch (final InterruptedException e) { throw new UncheckedException(e); } }
public void onJbiMessageExchange(MessageExchange mex) throws MessagingException { if (mex.getRole().equals(javax.jbi.messaging.MessageExchange.Role.CONSUMER)) { _ode._consumer.onJbiMessageExchange(mex); } else if (mex.getRole().equals(javax.jbi.messaging.MessageExchange.Role.PROVIDER)) { if (OdeContext.PM_SERVICE_NAME.equals(mex.getEndpoint().getServiceName())) { if (_ode._processManagementProcessor == null) throw new IllegalStateException("Process Management API not initialized"); _ode._processManagementProcessor.onJbiMessageExchange(mex); return; } if (OdeContext.IM_SERVICE_NAME.equals(mex.getEndpoint().getServiceName())) { if (_ode._instanceManagementProcessor == null) throw new IllegalStateException("Instance Management API not initialized"); _ode._instanceManagementProcessor.onJbiMessageExchange(mex); return; } Endpoint endpoint = new Endpoint(mex.getEndpoint().getServiceName(), mex.getEndpoint().getEndpointName()); OdeService svc = _ode.getService(endpoint); if (svc == null) { __log.error("Received message exchange for unknown service: " + mex.getEndpoint().getServiceName()); return; } svc.onJbiMessageExchange(mex); } else { __log.debug("unexpected role: " + mex.getRole()); } }
if (messageExchange != null) { if (__log.isTraceEnabled()) { __log.trace("Got JBI message for endpoint: " + messageExchange.getEndpoint().getEndpointName());
public MessageExchange createExchange(HttpServletRequest request) throws Exception { MessageExchange me = marshaler.createExchange(request, getContext()); if (me.getEndpoint() == null) { configureExchangeTarget(me); } // If the user has been authenticated, put these informations on // the in NormalizedMessage. if (request.getUserPrincipal() instanceof JaasJettyPrincipal) { Subject subject = ((JaasJettyPrincipal) request.getUserPrincipal()).getSubject(); me.getMessage("in").setSecuritySubject(subject); } return me; }
sb.append(" service: ").append(exchange.getService()).append('\n'); if (exchange.getEndpoint() != null) { sb.append(" endpoint: ").append(exchange.getEndpoint().getEndpointName()).append('\n');
protected boolean isClustered(MessageExchange me) { MessageExchangeImpl mei = (MessageExchangeImpl) me; if (mei.getDestinationId() == null) { ServiceEndpoint se = me.getEndpoint(); if (se instanceof InternalEndpoint) { return ((InternalEndpoint) se).isClustered(); // Unknown: assume this is not clustered } else { return false; } } else { String destination = mei.getDestinationId().getContainerName(); String source = mei.getSourceId().getContainerName(); return !source.equals(destination); } }
protected void onExchangeAccepted(ExchangeEvent event) { MessageExchange me = event.getExchange(); // This is a new exchange sent by a consumer if (me.getStatus() == ExchangeStatus.ACTIVE && me.getRole() == Role.PROVIDER && me.getMessage("out") == null && me.getFault() == null && me instanceof MessageExchangeImpl) { String source = EndpointSupport.getUniqueKey(me.getEndpoint()); EndpointStats stats = endpointStats.get(source); if (stats != null) { stats.incrementInbound(); } } }
private void writeMessageExchange(MessageExchange exchange) { println("-- Exchange " + exchange.getExchangeId() + " --"); writeProperty("endpoint", exchange.getEndpoint()); writeProperty("MEP", exchange.getPattern()); for (Object key : exchange.getPropertyNames()) { writeProperty(key, exchange.getProperty(key.toString())); } }
if (exchange.getRole() == Role.PROVIDER) { boolean dynamic = false; ServiceEndpoint endpoint = exchange.getEndpoint(); String key = EndpointSupport.getKey(exchange.getEndpoint()); Endpoint ep = this.component.getRegistry().getEndpoint(key); if (ep == null) { if (endpoint.getServiceName().equals(getEPRServiceName())) { ep = getResolvedEPR(exchange.getEndpoint()); ep.activate(); ep.start();
final ServiceEndpoint givenEndpoint = (ServiceEndpoint) exchange.getEndpoint(); final QName serviceName = exchange.getService(); final QName interfaceName = exchange.getInterfaceName();
if (((InternalExchange) exchange).getDestination() != null && me.getEndpoint() == null) { Endpoint ep = ((InternalExchange) exchange).getDestination(); Map<String, ?> props = context.getNmr().getEndpointRegistry().getProperties(ep);
public void exchangeSent(ExchangeEvent event) { MessageExchange me = event.getExchange(); if (me.getEndpoint() instanceof AbstractServiceEndpoint && me instanceof MessageExchangeImpl) { MessageExchangeImpl mei = (MessageExchangeImpl) me; String source = (String) me.getProperty(JbiConstants.SENDER_ENDPOINT); if (source == null) { source = mei.getSourceId().getName(); componentsAsConsumer.add(source); } else { ServiceEndpoint[] ses = getContainer().getRegistry().getEndpointRegistry().getAllEndpointsForComponent(mei.getSourceId()); for (int i = 0; i < ses.length; i++) { if (EndpointSupport.getKey(ses[i]).equals(source)) { source = EndpointSupport.getUniqueKey(ses[i]); break; } } } usedComponents.add(mei.getSourceId().getName()); if (((AbstractServiceEndpoint) mei.getEndpoint()).getComponentNameSpace() != null) { usedComponents.add(((AbstractServiceEndpoint) mei.getEndpoint()).getComponentNameSpace().getName()); } String dest = EndpointSupport.getUniqueKey(mei.getEndpoint()); Map<String, Boolean> componentFlow = createSource(source); if (componentFlow.put(dest, Boolean.TRUE) == null) { flowLinks.add(encode(source) + " -> " + encode(dest)); viewIsDirty(mei.getEndpoint()); } } }
+ xchng.getEndpoint()); if (inMsg != null) { LOG.info("setup message contents on " + inMsg);
+ xchng.getEndpoint()); if (inMsg != null) { LOG.info("setup message contents on " + inMsg);
if (concrete.getEndpoint() != null) { fake.setEndpoint(new org.objectweb.petals.tools.rmi.common.serializable. ServiceEndpoint(concrete.getEndpoint().getServiceName(), concrete.getEndpoint().getEndpointName(), concrete.getEndpoint().getInterfaces())); } else { fake.setEndpoint(null);
if (concrete.getEndpoint() != null) { fake.setEndpoint(new org.objectweb.petals.tools.rmi.common.serializable. ServiceEndpoint(concrete.getEndpoint().getServiceName(), concrete.getEndpoint().getEndpointName(), concrete.getEndpoint().getInterfaces())); } else { fake.setEndpoint(null);