I have tried passing in an outside function as a parameter for registerChaincodeEvent now it does not recognize it as eventCallback function and throws error like "eventCallback parameter not passed".
P.S.: Sorry for posting this question here, but I thought someone who might have already solved this specific scenerio could help.