Reputation: 9812
WebSocketEventListenerAdapter gives you the option to implement the onHandshake event:
@Override
public void onHandshake(WebSocketEvent event) {
LOG.debug("{}", event);
}
I need to do some third party operations during handshake but it doesn't seem to work
How is it possible with Atmosphere to trigger some actions during handshake and interrupt handshake if for example the client should not connect?
I do this on the onOpen event but I want to avoid it since the client first connects and then disconnects back if according to my logic I call AtmosphereResource.close() to close the connection.
I'm currently using Atmosphere with dropwizard (that means jetty), following some examples like so: https://github.com/mgutz/dropwizard-atmosphere
There is also an implementation with Netty called netosphere is it possible to implement onHandshake event?
Thanks
Upvotes: 1
Views: 190
Reputation: 1705
Yes, it should work. Which server are you using? let's have the discussion on the mailing list as some server may not be supported. But for sure it will works with nettosphere.
https://groups.google.com/group/atmosphere-framework?pli=1
Upvotes: 1