Results 1 to 2 of 2

Thread: Example of GatewayProxyFactoryBean

  1. #1
    Join Date
    Jun 2008
    Location
    Bangalore
    Posts
    18

    Default Example of GatewayProxyFactoryBean

    Hi

    Can any one of you provide me a working example or how to write a sample
    application which uses a GatewayProxyFactoryBean.

    How does the gateway namespace which accepts an iterface?
    How does invoking a method on this bean invoke the send and receive methods?

    Kindly explain.

    Thanks and Regards
    Bharath

  2. #2
    Join Date
    Oct 2007
    Location
    Toronto, ON
    Posts
    90

    Default

    Hi Bharath,

    Section "2.11 MessagingGateway" of the documentation covers that. It is valuable to look at "2.10 RequestReplyTemplate" before that.

    Some more detail:

    This generates a dynamic proxy that wraps the sending of a message and waiting for a response, so that it is usable as a Java class

    Essentially, the argument of the method will be sent as a message on the request-channel (using a MessageCreator) and if the method signature specifies a return value, the method call will block until the response message arrives on the reply-channel. If there are no method arguments, then the method will just block until a message arrives, if there is no return type for the method (i.e. it is void), the method will return immediately.

    Hope that helps,
    Marius
    Marius Bogoevici,
    Spring Integration Committer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •