protected Object execute(Object thiz, Object[] args) throws Exception {
final String fileURI = (String) args[0];
final String comment = (String) args[1];
final ScriptableFunction onFailure = (ScriptableFunction) args[2];
final BBMPlatformNamespace bbmpNpsc = BBMPlatformNamespace.getInstance();
final MessagingService msgService = bbmpNpsc.getMessagingService();
final MessagingServiceListenerImpl msgServiceListener = bbmpNpsc.getMessagingServiceListener();
if(args.length == 3) {
msgServiceListener.setOnFileTransferFailed(onFailure);
msgService.sendFile(fileURI, comment);
} else if(args.length == 4) {