1

I am using Azure Service Bus to receive the topic subscription messages and I need to pass the field of an enum( com.microsoft.azure.servicebus.ReceiveMode.RECEIVEANDDELETE ) to a method.

Any suggestions greatly appreciated!

Abhishekh Gupta
  • 6,206
  • 4
  • 18
  • 46

1 Answers1

1

What do you mean "tried using dollar format for enums"? If you mean use a $, that is only needed with inner classes. ReceiveMode isn't an inner class, so just create it as usual:

mode = createObject("java", "com.microsoft.azure.servicebus.ReceiveMode");

Then pass the static field RECEIVEANDDELETE into the method

otherObject.someMethod( mode.RECEIVEANDDELETE );
SOS
  • 6,430
  • 2
  • 11
  • 29