Hi,
The port number worked. Thanks :)
I am using the handler as follows:
class messenger (Component):
def configure (self, configuration):
Msg_event.register_event_converter(self.ctxt)
self.register_handler(Msg_event.static_get_name(), myHandler)
def getInterface (self):
return str(self.__class__)
def myHandler (e):
import logging
logging.getLogger('nox.coreapps.messenger.messenger').info('received')
I am receiving the following error after every log.info
00003|nox.coreapps.messenger.messenger|INFO:received
00004|pyrt|ERR:Python handler returned invalid Disposition.
1. I don't understand what is causing the error. Can you please suggest
what I am doing wrong?
2. I want to obtain the message in the form of a string. What is the
function to convert the incoming message into a string? (something
analogous to e.jsonstring in the JSON messenger handler)
3. I would like to add this messenger to my existing NOX application. Do
I just add the "def configure" alongside "def install" & "def
getInterface"? Do I need to append anything to the "def __init__"?
Thanks and Regards,
Neha
On Tue, Aug 7, 2012 at 3:43 PM, Murphy McCauley
<[email protected]>wrote:
> According to the doxygen...
>
> http://www.noxrepo.org/_/nox-classic-doxygen/messenger_8hh.html
>
> .. it's 2603.
>
> -- Murphy
>
> On Aug 7, 2012, at 2:14 AM, Neha Jatav wrote:
>
> Hi Murphy,
>
> Wow! That was quick :)
> Which is the default port for the non-JSON messenger?
>
> -Neha
>
> On Tue, Aug 7, 2012 at 2:42 PM, Murphy McCauley <[email protected]
> > wrote:
>
>> On Aug 7, 2012, at 2:05 AM, Neha Jatav wrote:
>>
>> *I rectified it by adding the files *.pem from the previous messenger
>> folder to the one provided by you. Can you please verify if this will work
>> fine.*
>>
>>
>> Yeah, should be fine, especially if you're not planning to use SSL.
>>
>> I want to create an external JAVA application that will send JSON objects
>> over TCP (port 2703). I was wondering if something like DataStreamOutput
>> will work for the sender side? Will the JSON messenger in NOX be able to
>> respond to the messages sent in that way?
>>
>>
>> No, because those won't be JSON messages. json.org has some Java code
>> to construct JSON messages. And there's json-simple. And google-gson...
>>
>> Though if you don't care about JSON, it might even be easier to just use
>> the non-JSON messenger... I think you'll be able to create appropriate
>> messages with DataOutputStream fairly easily.
>>
>> -- Murphy
>>
>>
>
>