| Cameron McCormack 2006-04-17, 4:07 am |
| Hi everyone.
I'm not very familiar with the security classes in Java, so hopefully
someone can help me. I want to restrict the current thread from making
any connections to a host other than one that I specify (ideally I'd
like to enforce this restriction just in a block of code), in much the
same way that same-host origin security is enforced in applets. It also
should be possible to connect to this host through the proxy that is set.
I will be making connections using a HttpURLConnection object. Since
this object will hide redirects from me, I can't just compare the host
of the URL I will be fetching initially. I can create a
SocketPermission that represents the connection I wish to allow, but I
don't know what to do with this object, or to make sure that all other
connections fail.
Can someone point me in the right direction?
Thanks,
Cameron
--
Cameron McCormack ICQ: 26955922
cam (at) mcc.id.au MSN: cam (at) mcc.id.au
http://mcc.id.au/ JBR: heycam (at) jabber.org
|