directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Doran <matt.do...@papercut.com>
Subject Re: Custom partition - obtaining network connection details
Date Sun, 28 Mar 2010 12:05:10 GMT
On 28/03/2010 5:55 PM, Matt Doran wrote:
> Hi there,
>
> I've been working through implementing a custom partition.  I have a 
> peculiar requirement to know the details of the network connection 
> where the request has come from when I'm processing the partition 
> requests (i.e. in my custom partition implementation).
>
> I can't see anything obvious that might give me access to this 
> information.  Is this possible?
>
> If I wanted to add this info (even as a thread local), is there a hook 
> point that I could use to collect/save this information?
>
>

I found the "getClientAddress()" method available on the session.  e.g.  
in the following code fragment.

         public ClonedServerEntry lookup(LookupOperationContext ctx) {

             if (logger.isDebugEnabled()) {
                 logger.debug("lookup(dn=" + ctx.getDn() + "), attrs: "
    + ctx.getAttrsId()
                         + " addr: " + ctx.getSession().getClientAddress());
             }


However it always seems to be null even when making requests to the 
server over the network.   Any ideas?

Regards,
Matt

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message