org.ow2.petals.se.eip.patterns
Class WireTap

java.lang.Object
  extended by org.ow2.petals.se.eip.patterns.AbstractPattern
      extended by org.ow2.petals.se.eip.patterns.WireTap
All Implemented Interfaces:
Pattern

public class WireTap
extends AbstractPattern

Before sending the Exchange to the Service provider (or consumer for the response), Copy the In or OUT message and send it to a "monitoring service".
The message sent to the monitoring service is InOnly

  • request mode: copy the content of the in message to the monitor and send the exchange to the provider; response is received and send back to the consumer
  • response mode : send the exchange to the provider, receive the response, copy the content of the out or the fault message to the monitor and send back the response to the consumer
  • request-response mode : send the exchange to the provider, receive the response, copy the content of the in and the out or the fault messages to the monitor
  • request-on-response mode : send the exchange to the provider, receive the response, copy the content of the in message if no fault message received to the monitor

  • TODO This pattern must be refactored to be asynchronous

    Author:
    alouis - EBM WebSourcing, chamerling - EBM WebSourcing, fgardes - EBM WebSourcing

    Field Summary
    static java.lang.String REQUEST_ON_RESPONSE_WAY
               
    static java.lang.String REQUEST_RESPONSE_WAY
               
    static java.lang.String REQUEST_WAY
               
    static java.lang.String RESPONSE_WAY
               
    static java.lang.String WIRE_TAP_NAMESPACE
               
     
    Fields inherited from class org.ow2.petals.se.eip.patterns.AbstractPattern
    logger
     
    Constructor Summary
    WireTap()
               
     
    Method Summary
     java.lang.String getName()
              Get the pattern name.
     java.lang.String getNameSpace()
              Get the pattern namespace.
     void init()
              Initialize the pattern
     boolean process(org.ow2.petals.component.framework.api.message.Exchange exchange, ExchangeContext context)
              Process the message.
     boolean processAsync(org.ow2.petals.component.framework.api.message.Exchange exchange, ExchangeContext context, CommonAsyncContext asyncContext)
              Process the async message.
     boolean validateMEP(java.net.URI mep)
              Validate the MEP for the pattern.
     
    Methods inherited from class org.ow2.petals.se.eip.patterns.AbstractPattern
    isAttachmentMode, isExceptionRobust, isFaultRobust, isFaultToException, logSend, processAsyncPattern, processExpiredAsync, processPattern
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    WIRE_TAP_NAMESPACE

    public static final java.lang.String WIRE_TAP_NAMESPACE
    See Also:
    Constant Field Values

    REQUEST_WAY

    public static final java.lang.String REQUEST_WAY
    See Also:
    Constant Field Values

    RESPONSE_WAY

    public static final java.lang.String RESPONSE_WAY
    See Also:
    Constant Field Values

    REQUEST_RESPONSE_WAY

    public static final java.lang.String REQUEST_RESPONSE_WAY
    See Also:
    Constant Field Values

    REQUEST_ON_RESPONSE_WAY

    public static final java.lang.String REQUEST_ON_RESPONSE_WAY
    See Also:
    Constant Field Values
    Constructor Detail

    WireTap

    public WireTap()
    Method Detail

    getName

    public java.lang.String getName()
    Description copied from interface: Pattern
    Get the pattern name.

    Returns:
    The name

    getNameSpace

    public java.lang.String getNameSpace()
    Description copied from class: AbstractPattern
    Get the pattern namespace.

    Specified by:
    getNameSpace in class AbstractPattern
    Returns:
    The namespace

    init

    public void init()
    Description copied from interface: Pattern
    Initialize the pattern


    process

    public boolean process(org.ow2.petals.component.framework.api.message.Exchange exchange,
                           ExchangeContext context)
    Description copied from class: AbstractPattern
    Process the message.

    Specified by:
    process in class AbstractPattern

    processAsync

    public boolean processAsync(org.ow2.petals.component.framework.api.message.Exchange exchange,
                                ExchangeContext context,
                                CommonAsyncContext asyncContext)
    Description copied from class: AbstractPattern
    Process the async message.

    Specified by:
    processAsync in class AbstractPattern

    validateMEP

    public boolean validateMEP(java.net.URI mep)
    Description copied from class: AbstractPattern
    Validate the MEP for the pattern. This method is called on each message exchange in order to validate that the MEP is compatible.

    Specified by:
    validateMEP in class AbstractPattern
    Parameters:
    mep - the mep of the incoming message.
    Returns:
    true if the mep is compatible, false otherwise.


    Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.