vert-x/mod-lang-jython — pull request #42 by fregaham (2014-07-05 10:51:15+00:00)
Title: fix SockJSSocket handler_id, return java_obj.writeHandlerID() directly

The current SockJSSocket handler_id() code is definitely wrong, as the self.handler_id replaces the handler_id method. I assume there is no reason why not to return java_obj.writeHandlerID() directly, so this patch does that. I also assume the handler_id should be a method and not a property.

To reproduce the issue

server.py:
```python
import functools
import vertx
from core.event_bus import EventBus
from core.buffer import Buffer

server = vertx.create_http_server()

@server.request_handler
def request_handler(req):
file = ''
if req.path == '/':
file = 'index.html'
elif '..' not in req.path:
file = req.path[1:]
req.response.send_file(file)

sockJSServer = vertx.create_sockjs_server(server)
bridge = sockJSServer.bridge({'prefix' : '/eventbus'},
[],
[])

@bridge.socket_created_handler
def bridge_socket_created_handler(socket):
print "my socket created, address: " + `socket.handler_id()`
EventBus.send(socket.handler_id(), Buffer.create_from_str('{"address":"some-address","body":"Hello, world"}'))

server.listen(8080, 'localhost')
```

index.html:

```html

Hello

```