From: Craig C. <cra...@gm...> - 2015-07-14 13:54:46
|
Hi Sean, Our business is monitoring end-user systems. So an IP address of that remote system *is* part of our business logic ;-) I don't know why I'd have to justify it, just look at HttpServletRequest, you can get the remote address of the connected entity using that API, but because we're in netty we don't have access to that. We want similar information from netty that we get from a web container. Hopefully that's clear. Cheers, Craig On Tue, Jul 14, 2015 at 8:15 AM, Sean Dawson <sea...@gm...> wrote: > > Craig, > > It doesn't seem like netty channels ought to be getting passed around your > business layer, since they're a fairly low-level concept. Traditionally > your business objects would be brokered and manipulated by some kind of > service or data access layer that would know about transport concerns...? > Can you elaborate on your use case? > > > On Mon, Jul 13, 2015 at 9:29 AM, Craig Ching <cra...@gm...> wrote: > >> Hi Sean, >> >> Thanks for the response! First, is the netty Channel available in some >> layer that I can access and pass up to our business logic layer? >> Preferably without changes to RestEasy, but we can probably take on that >> work if we were sure the functionality would be accepted into RestEasy. >> Second, as far as proxies go, we expect that will be the case most of the >> time ;-) That's ok for our use-case. >> >> Cheers, >> Craig >> >> On Fri, Jul 10, 2015 at 11:13 AM, Sean Dawson <sea...@gm...> >> wrote: >> >>> >>> I'm not an expert in Netty - and I hope I understood your question - >>> but.... >>> >>> It looks like there's a "remoteAddress()" on Channel (name different in >>> netty 4 vs. 3). >>> >>> http://netty.io/4.0/api/io/netty/channel/Channel.html#remoteAddress() >>> >>> Note that this can deceive if there's a gateway / proxy in play. >>> >>> See: >>> >>> >>> https://stackoverflow.com/questions/11865165/netty-getting-remote-ip-address-in-messagereceived >>> >>> >>> On Thu, Jul 9, 2015 at 5:46 PM, Craig Ching <cra...@gm...> >>> wrote: >>> >>>> Hi all, >>>> >>>> I'm wondering if there's a way to get the remote client's hostname/ip >>>> address when we're using Netty. Normally we'd just use @Context >>>> HttpServletRequest and getRemoteAddr() method, but we're in Netty and don't >>>> have that available to us. >>>> >>>> Is there any way we could do this? Possibly writing an "interceptor" >>>> or whatever it's called now? We're using RestEasy 3.0.10.Final and netty >>>> 4.0.25.Final if that helps. >>>> >>>> Cheers, >>>> Craig >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Don't Limit Your Business. Reach for the Cloud. >>>> GigeNET's Cloud Solutions provide you with the tools and support that >>>> you need to offload your IT needs and focus on growing your business. >>>> Configured For All Businesses. Start Your Cloud Today. >>>> https://www.gigenetcloud.com/ >>>> _______________________________________________ >>>> Resteasy-users mailing list >>>> Res...@li... >>>> https://lists.sourceforge.net/lists/listinfo/resteasy-users >>>> >>>> >>> >> > |