Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

What is the Use of Proxy Object.

Thread view: 
kris - 12 Apr 2006 13:46 GMT
Hi,

I am in a confusion to get the usage of a Proxy Object and attaching a
Handler to that one.
Can you tell me what is the use and where it is useful with a simple
use case. Thanks in Advance.

Thanks & Regards
Krishna Prasad.
Alex Hunsley - 12 Apr 2006 18:08 GMT
> Hi,
>
> I am in a confusion to get the usage of a Proxy Object and attaching a
> Handler to that one.

What sort of proxy are you talking about? A communications proxy (for
example an HTTP proxy), or the design pattern called proxy, or something
else?

> Can you tell me what is the use and where it is useful with a simple
> use case. Thanks in Advance.

Not until you explain more specifically what you're after...
kris - 13 Apr 2006 08:38 GMT
Hi  Alex I am talking about the java.lang.reflect.Proxy.  Larry gave me
the solution. BUt any way thanks.
Larry Barowski - 12 Apr 2006 18:57 GMT
> Hi,
>
> I am in a confusion to get the usage of a Proxy Object and attaching a
> Handler to that one.
> Can you tell me what is the use and where it is useful with a simple
> use case. Thanks in Advance.

If you mean  java.lang.reflect.Proxy , one use is to
provide an implementation for an interface that may or
may not be present at runtime. For example, you could
implement a MouseWheelListener in code that runs
under Java 1.3, which has no MouseWheelListener,
and later versions, which do. The code would check
for the existence of the interface and do nothing if it
does not exist. This is a safer way to do this than using
stubs.
James McGill - 12 Apr 2006 19:48 GMT
I would like to create a Shape that is the segment of an Arc, bounded by
concentric circles.  I need to do this in order to paint just that area
of a circle instead of painting the pie slice.  Picture of what I want
is here:
http://www.u.arizona.edu/~jmcgill/circlePaintProblem.png

I tried to fill in the sectors, procedurally using lines, but that's
ugly.

What I really want to do is, create an Arc, slice that Arc between
two Circles, and end up with a Shape that is only the result of the
intersection.  If there's not a way to actually get a Shape like that,
maybe I can do it with Alpha so that only the piece I want gets drawn?  

Thanks, I hope my explanation is clear.

James
James McGill - 12 Apr 2006 23:02 GMT
Nevermind, I figured out how to do it with Area.  Just subtract one arc
from the other.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.