Apache Directory Project - [jira] Commented: (DIRMINA-116) Get the Service from which a connection is accepted

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > November 2005 > [jira] Commented: (DIRMINA-116) Get the Service from which a connection is accepted





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Commented: (DIRMINA-116) Get the Service from which a connection is accepted
Greg Bodi (JIRA)

2005-11-11, 5:45 pm

[ http://issues.apache.org/jira/brows...action_12357396 ]

Greg Bodi commented on DIRMINA-116:
-----------------------------------

Yes, putting it as a session attribute would accomplish the same thing. However, would it then be possible to expose IoProtocolSession.getIoSession() up to the IoSession interface so that I could still access it from a ProtocolHandler? i.e.:

public void messageReceived(ProtocolSession session, Object message) throws Exception
{
...
Service service = (Service)session.getIoSession().getAttribute(ServiceRegistry.SERVICE);
...
}

Or, would it safe enough to try to cast down (i.e., make an assumption that's it not a VmPipeSession)?

public void messageReceived(ProtocolSession session, Object message) throws Exception
{
// not pretty, but fine if it works
Service service=(Service)((IoProtocolSession)ses
sion).getIoSession().getAttribute(ServiceRegistry.SERVICE);
...
}

Or maybe is this somehow possible via another mechanism I overlooked? Thanks!

> Get the Service from which a connection is accepted
> ---------------------------------------------------
>
> Key: DIRMINA-116
> URL: http://issues.apache.org/jira/browse/DIRMINA-116
> Project: Directory MINA
> Type: Improvement
> Versions: 0.8
> Reporter: Paolo Perrucci
> Assignee: Trustin Lee
> Priority: Minor
> Fix For: 0.9


>
> When a new connection is accepted may be usefull to know the related Service.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com