How can we change the behaviour of a method by using proxy ??

Hi ,
can anybody tell me how we can add or change the behaviour of a method in java using the proxy object ?? it would be better if u put ur idea with an example .
Thanks ,
Ganesh

Please take your time to write full words: "you" instead of "u", "your" instead of "ur". It makes your posts a lot easier to read, especially for those of us who don't have English as their native language.
You can not really "modify" the behaviour of a method by using a proxy, but you can create a proxy, direct all but one method to the original method and provide a separate implementation for the target method.
This way you'll have two objects with the same interface (not only in the Java sense, but all methods look the same), but differing behaviour: the original object and the proxy.
Now if you pass around the proxy instead of the original object, then it'll look as if you changed the behaviour of your object.

Similar Messages

  • How can I change the window size of iTunes?  Used to be easy before installing Mavericks.

    How can I change the window size of iTunes on my iMac?  Used to be easy before installing Mavericks.

    If you want to make the itunes tab so you can see the dock
    you press the
    esc
    button if your in full screen mode
    if you want to get into full screen mode you press the arrows facing away from eachother in the top right corner
    there is another way to get to the normal tab if your in full screen
    make the curser go right up to the top of the screen and it will show the apple tab
    it will have two arrows facing together highlited in blue
    if u tap that it will take you to the normal tab

  • How can I change the password for my access to using firefox?

    Answers deny there is any password -- however, now and then I am asked to confirm that I am the person identified on the MY Yahoo -- I am asked for a username and password.
    An example is when I change computers and Yahoo or Mozilla does not recognize the new computer.
    I do not understand -- yes normally, I simply open the browser and use it. BUT!!!
    I am probably using the wrong jargon for what I want to change.

    hello, yahoo will log you out after 2 weeks for security purposes - it might also recognize when you access your yahoo account through a different device & ask for authentication again. this is all determined on the server-side by yahoo, so firefox can't influence such behaviour...
    http://help.yahoo.com/kb/index?locale=en_US&page=content&y=PROD_GRPS&id=SLN2660&impressions=false
    if you have the impression that these log-outs happen to often or are inconvenient you can also try to [http://io.help.yahoo.com/contact/index?locale=en_US&y=PROD_ACCT&page=contact contact yahoo's support]...

  • How can I change the background color in text box using RGB format

    Can some one tell me if Mac Pages (version 5.0) allows users to customize the background color of a text box using RGB color format?  It appears that the text color can be changed using RGB but background color is limited to a few standard colors.   Thanks

    They are just sample swatches, use the Color Picker to choose anything you want.
    Peter

  • How can i change the html, jsp, js, css file using ../tools/filemanager.jsp

    Hallo Experts
    I want to know how to get the html, jsp, js, css file using .../strategy/tools/filemanager.jsp? If I search the file such as "commentslist", I'll find the file. It is shown in the table with three columns:
    Column with trash symbol for deletion, Path and Date. But I cannot to fetch the file and saved local to make the modifications.  Could you tell me how I can get the file? Is there another way to this?
    Thanks a lot and
    Best regards!
    Ping

    Wang,
    If you are looking at the commentslist file with the intention of customizing, you would use File Manager Path to be directed to the file's location:
    \usr\sap\<3 letter CE instance>\J00\j2ee\cluster\apps\sap.com\xappscpmsm~strategymanagement\servlet_jsp\strategy\root\pilotworks
    Any customization would have to be noted, since upgrades will overwrite customizations.
    Regards,
    Bob

  • How can i change the format of output captured footage using DSR-11 in Premiere Pro CS5.5?

    Hi.
    I am using Premiere Pro CS5.5, capturing footage off a mini-DV casette (NOT HD) using a Sony DSR-11. All is well with that, except for that the output is an .avi rather than MP4 (H264). I am under the impression that H264 with the extension of .MP4, is better than avi.
    Does anyone know if it is possible to change the format of that outputted footage?
    thanks:)

    thanks Ann, Jim. I was afraid u'd say avi is the only option w/capturing, but am happy to hear it is the best option. Thanks again, and to the others who replied (and i will look at the "best export format/codec" page:)

  • How can i change the voltage of my power supply using my pci gpib 488.2 driver?

    I need to be able to control the voltage outputed by the power supply. I have a pci gpib 488.2 and I downloaded the correct driver. I also don't no exactly how to use the communicator included in the measurement and automation explorer. When ever I type in the commands I get an error. If anyone can help me I would appreciate it.
    thank you

    First see if you can establish communications with the power suppy using Meas and Automation explorer (MAX for short). If you can find your GPIB card in the directory tree choose it and then use the scan for instruments tool. If it can see your power supply it will give you it's address. Choose it and try the Communicate with my instrument tool. It will send a IDN? command to that address and it might return a string if the instrument understands the command. If not you will need to dig through the power supply manual to find the correct commands.
    Using LabVIEW 2010SP1 and TestStand 4.5

  • How can I change the caption of a text field using data?

    Hi, I've read that this is possible to do but when you have an xsd file, I'm using a preview xml data file, so there is no way to link them together, any ideas?.
    Thanks!.

    1) In Designer, Tools>Options
    2) Select Data Binding in the left pane and make sure Show Dynamic Properties is checked
    3) Select the field that you want the caption to be driven by XML
    4) In the Object palette under the Field tab you'll notice Caption is now green and underlined, click it.
    5) If your form is bound to a schema you can see the hierachy when you press the button beside the binding entry field or in your case to access the Caption attribute in your XML type> $.textField1.Caption
    Assuming '$' is your root node.
    Kyle

  • How can I change the new tab homepage ?

    how can I change the " new tab " homepage

    By default Firefox uses a blank page in a new tab. Something you installed changed that to I-PLAY. You need to figure out what changed that, and get rid of it. Start with this. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • How do I change the behaviour of an update button.

    I have a variable - $UpdateFlag, which contains a string and updates a table with it on the click of the update button.
    The problem I have is that if the string is blank, I don't want to update, and I want the button to exit instead.
    here's the code. At the moment the button does nothing if $UpdateFlag is blank.
    How do I change the behaviour of the button so that it can update or exit based on $UpdateFlag?
    <?php
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1") and $UpdateFlag !='' ) {
      $updateSQL = sprintf("UPDATE offer SET status=%s WHERE offer_id=%s",
                           GetSQLValueString($UpdateFlag ,"text"),
                           GetSQLValueString($_GET['offer_id'], "int"));
      mysql_select_db($database_guitarswap_db, $guitarswap_db);
      $Result1 = mysql_query($updateSQL, $guitarswap_db) or die(mysql_error());
      $updateGoTo = "Member2.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
        echo OK;
      header(sprintf("Location: %s", $updateGoTo));

    Add an else statement to do what you want if the flag is empty.
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1") and $UpdateFlag !='' ) {
      $updateSQL = sprintf("UPDATE offer SET status=%s WHERE offer_id=%s",
                           GetSQLValueString($UpdateFlag ,"text"),
                           GetSQLValueString($_GET['offer_id'], "int"));
    mysql_select_db($database_guitarswap_db, $guitarswap_db);
      $Result1 = mysql_query($updateSQL, $guitarswap_db) or die(mysql_error());
    $updateGoTo = "Member2.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
        echo OK; // <-- This will cause a parse error
      header(sprintf("Location: %s", $updateGoTo));
    } else {
      //do something else
    Note that your echo statement will cause a parse error. OK is a string, and should be in quotes. Also, it will prevent the redirect from working.

  • Can we change the behaviour of PopUp Anchor component?

    Hi,
    I have a datagrid. I am using an item renderer in one of its column to display a button. On the click of the button, I use a pop anchor component to open a pop up window below the selected row.
    Now My Problem is the fact that the the popup anchor opens the popup above the row as not does not find space below. My question is :
    1) How can I change this behaviour to ensure that popup anchor can increase the size to accomadte the pop up being opened? I am sure this require changes in PopUp anchor class but I am not sure how best to acheive it.
    2) Since pop is virtually part of the grid , can we effect change in size of the grid if the pop up is being opened at few bottom rows and it does not find enough space.

    Actually I want to increase the screen size such that the browser scroll also expands and the pop up shows up and when the popup closes resizing happens.
    Can you help me with some code samples of how to effect the above requirement?

  • How can I change the display of Inbox in my iPad's mail app- so that it takes up the full screen?

    How can I change the display of Inbox in my iPad's mail app- so that it takes up the whole screen, as opposed to just about one third; the other two thirds display the full text of the selected email?

    You can't change the display in the Mail app, if you are holding the iPad in landscape orientation then the left-hand third will be for navigation, and the right-hand two-thirds will be an email. If you hold the iPad in portrait orientation then the navigation section becomes a drop-down section.

  • How can I change the background of a running webpage on my own. Example Facebook I want to change its backround color from white to black just in my view not for all

    How can I change the background of a running webpage on my own. Example Facebook I want to change its background color from white to black just in my view, not for all. Cause I really hate some site with white background because as I read for an hour it aches my eyes but not on those with darker background color.

    You can use the NoSquint extension to set font sizes (text/page zoom) and text colors on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • HT201361 Is it possible to save the screenshot files to a different folder than desktop. How can I change the folder?

    Is it possible to save the screenshot files to a different folder than desktop (that is the default). How can I change the destination folder? Thank you, Sal

    To change the screenshot capture location to a new place on your Mac, first think of a location that would serve you properly. We like to place ours in a "Screenshot" folder located inside of the User's "Pictures" folder. To change the location to this new location, open the Terminal and enter the following command:
    defaults write com.apple.screencapture location /Users/[u]/Pictures/Screenshots/
    Replace "[u]" with the name of the user on your system. Once you have entered this command, let's restart the screen capture utility by restarting the SystemUIServer by entering the following command:
    killall SystemUIServer
    You can optionally log out and back in instead of entering this second command, thus restarting the SystemUIServer. Once restarted, all screen captures taken from here on out will end up in your /Pictures/Screenshots/ folder in the User's home folder on your Mac.

  • How can I change the default apple ID for app store. I bought the macbook from my school when I left and I'm the ID in place of mine is the computer departments one. How can i change it to mine?? Thanks

    How can I change the default apple ID for app store. I bought the macbook from my school when I left and I'm the ID in place of mine is the computer departments one. How can i change it to mine?? Thanks

    http://support.apple.com/kb/ht5621

Maybe you are looking for

  • After the Mac transfer from my old laptop to the mac, where do I find my copied excel files

    I just had a Mac transfer done from my old laptop to my new Macbook Pro and I don't know where to find my old excel files?

  • IPhone 4s (out-of-warranty) cost of screen repair?

    So I have an iPhone 4s that I know is out-of-warranty. I do not have Applecare+. Today at work my phone got knocked off a table onto the floor, and when I checked the phone, everything was working fine. But when I went to check it on my break a coupl

  • Problem maya 2012 and lion!

    Hello, I got a problem that many others also have. I installed lion a week ago, and i got maya 2012 today. So when i where trying to install he said on the and of the installation that is was not compatible with mac os x 10.7. This is for me a big pr

  • Account hacked, credit card used and cant get acce...

    Hi,  I have had my main account hacked again for a second time and cannot get access back. I just got some skype notifications that there have been 12 purchases made in China on my acount. I cannot recover my password as it never sends me the recover

  • Do we need to create users in expdp

    Hello Guys I need to do expdp impdp to migrate a database to another server with same OS and oracle version. Do i need to create users.If not will they take the same passwords automatically. also please tell which way i can run my expdp and impdp fas