ColdFusion asynchronous calls (event gateway)

February 1, 2008 at 2:12 am 2 comments


Do you have some methods that require lots of processing, but don’t want the customer to have to wait for the result? I’ve programmed a cool event gateway today, very simple, but it allows you to pass an object to it, the method to call, and the arguments.

Anyone interested in the component, just leave a comment with your details and I’ll forward you a copy of the code.

The code to make the asynchronous call is as following:

<cfscript>
 myData = structNew();
 myData.object = request.new( “Test” ).init(); // creates a new object
 myData.methodName = “test”; // the name of the method to call on the object
 myData.argumentCollection.ipAddress = cgi.REMOTE_ADDR; // the arguments to pass
 sendGatewayMessage( “ASynchronousCall”, myData ); // make the asynchronous call
</cfscript>

It’s that easy, very powerfull and saves your customers from waiting on processing that can be done behind the scenes and requires no response to be returned to screen.

Any questions, just ask 😉

Advertisements

Entry filed under: ColdFusion. Tags: , , .

Application.cfc event methods order (order called in) Business Directory Website (justweb)

2 Comments Add your own

  • 1. Geron P  |  February 21, 2008 at 7:41 pm

    Please forward me the code so that I can take a look at this. Thanks!

    Like

    Reply
  • 2. Australian Search Engine  |  February 21, 2008 at 9:48 pm

    Hi Geron, the code is on the way.

    Like

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 19 other followers

Archives

Top Rated

Top Clicks

  • None

Blog Stats

  • 168,383 hits

%d bloggers like this: