Monthly Archives: August 2014

Async HTTPListener (handy for test)

The crux of it is at http://msdn.microsoft.com/en-us/library/system.net.httplistener.begingetcontext%28v=vs.110%29.aspx. (minor improvement made with use of lamda) //prefixes are the URLs you want to intercept public static void NonblockingListener(string [] prefixes) { HttpListener listener = new HttpListener(); foreach (string s in prefixes) { listener.Prefixes.Add(s); } … Continue reading

Posted in Uncategorized | Leave a comment

How to “own” Mule ESB: Callable

An easy way to inject custom logic in Mule is through implementing “Callable” Java objects and using the Mule Studio Java component. import org.mule.api.lifecycle.Callable; import org.mule.api.MuleEventContext; import org.mule.api.MuleMessage; public class DoMyStuff implements Callable { @Override public Object onCall(MuleEventContext ec)    throws … Continue reading

Posted in Uncategorized | Leave a comment

ToDictionary with lambda’s

http://stackoverflow.com/questions/905933/lambda-way-to-fill-the-value-field-in-the-todictionary-method  

Posted in Uncategorized | Leave a comment