On Jul 11, 2006, at 1:53 AM, Lee Kemp wrote:
I am trying to create a filter that will authenticate a users connection. So, When a new session is created the first message that the server recieves will be a user name and password, if this is incorrect I want to close there session without the protocol handler receiving the message.

If I call session.close() in the filter the protocol handler still receives the message and then closes the session.

Is there a way to stop messageRecieved() being called on the protocol handler after my filter?

Sure, in your filter, don't pass on the message that contains the authentication data. That is, don't call nextFilter.messageReceived ( session, message ); if you don't want the protocol handler to get the event.

-pete


--
[EMAIL PROTECTED] - http://fotap.org/~osi



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to