Meaning of ProviderContext methods.

Hello,
In viewing the java docs for the ProviderContext there are two methods that do not have any documentation provided and I believe they are the methods that I have been looking for. The methods in question are:
refresh() and allContentChanged()/contentChanged(String channelName)
Could SUN please provide an explaination as to what these methods do. I would have expected them to flush the "refresh cache" that you can set at the individual channel level. But it seems that they are not performing as expected. I have a custom provider that has the "refreshTime' set to 120 (seconds). If I make a change to the properties in the provider profile those changes do not take effect until 1. The refresh time is met or 2. The user logs out and logs back in again. I am calling both refresh() and allContentChanged in the processEdit method of my provider in hopes that this will cause the "desktop" cache to be flushed. Any pointers?
-matt

Within my processEdit method for my provider I am setting properties in the dp - then calling refresh - neither of these two operations is causing the desktop to flush it's cache. I will try the -1 setting and test again.
Within my provider I am calling:
setStringProperty("foo", foo);
then getPageContext().refresh();
-matt

Similar Messages

  • Meaning of factory method in abap objects

    Hi,
    Can anybody help me in understanding the meaning of factory method in abap object? what is the importance of this?
    Regards
    Sudhansu

    Hi Krish and Sudhansu,
    Design patterns are solutions which are already verified and known by many developers. That is why it is worth to use them. There is no need to reinvent the wheel in many cases.
    I would recommend book which is placed in the ABAP world:
    http://www.sap-press.com/products/Design-Patterns-in-Object%252dOriented-ABAP-(2nd-Edition).html
    Although Java language has intuitive syntax, there are some special things in ABAP development so it is better to check solutions adjusted for ABAP editor.
    The most common usage of factory pattern is to simplify object creation.
    - By one method call you provide required parameters and do all initializations, including dependent objects.
    - Class can have many factory methods, if you want to provide more ways of initialization.
    - Factory method is usually static in the class and they return initialized instance of object for this class.
    - There is naming convention to start factory method name with "create" - easy to recognize pattern.
    - If you set property of class to "private instantiation" then you force to use factory method for object creation. In this way it is really simple to find all places where object are created with given set of input parameters - find references of factory method.
    Factory pattern becomes even more powerful if we add inheritance. Factory method returns basic object (like ZCL_VEHICLE) but its implementation can return different subclass instance, depending on input parameter (ZCL_CAR, ZCL_TRAIN etc). Each instance can implement differently behavior (methods implementation), but these are object oriented techniques.
    Regards,
    Adam

  • Fatal Internal error: "oleautomgr.cpp", line 2832 when sending data by means of ActiveX methode

    I have experienced  error "Fatal Internal error: "oleautomgr.cpp", line 2832" during sending data to CAN card IXXAT iPCI-I XC16/PCI. LabVIEW communicates with that card by means of ActiveX methodes via "VCI Wrapper" which is COM object interface. Mass compiling of the project does not help. Card is initialized and configured propely. The driver card is working propely.
    LabVIEW version is 8.5
    The efect of that error is that labview completly shot down.
    I appraciate any suggetions
    thanks a lot

    Hello,
    Please try to reinstall the drivers for the CAN card, then make sure you close all references to the ActiveX control (at all levels) using the Automation Close primitive in LabVIEW.
    Regards,
    Emil

  • Meaning of Supplemental Method subtypes in SAP

    Hi
    Can you please let me know the exact understanding of the following Supplemental Method subtypes in SAP as captured in the screen shots and what they do.
    Thanks
    Rahul

    Hi Rahul,
    When you login to https://mybsi.com you should be able to go to MySupport-->MY BSI TF Tools-->Quick Formulas, select your BSI TaxFactory version and select relevant state or FED or locality for state as required to look on documentation or examples of how each method would calculate taxes.
    Thanks,
    Ameet

  • Which object's monitor does a synchronized method acquire?

    from the Java Tutorial for concurrency programming:
    " When a thread invokes a synchronized method, it automatically acquires the intrinsic lock _for that method's object_ and releases it when the method returns. The lock release occurs even if the return was caused by an uncaught exception. "
    what exactly does this mean?
    do synchronized methods acquire the monitors for objects of type: java.lang.reflection.Method
    please consider this code:
    public class Foo {
      private int counter = 0;
      public synchronized void incriment() { counter++; }
      public synchronized void decriment() { counter--; }
    Foo f = new Foo();
    Class[] sig = new Class[0];
    Method m = f.getClass().getMethod("incriment", sig);
    // ok. so "m" is the relevant method object.
    f.incriment(); // <-- is the monitor for "m" ,
                          // or the monitor for "f", acquired?
    .......my reading of the Concurrency Tutorial is that synchronized methods use the monitors of java.lang.reflection.Method objects?
    and thus, Foo is not thread safe, right?
    however, this simple change makes Foo thread-safe?
    public class Foo {
      private volatile int counter = 0; // "volatile"
      public void incriment() { counter++; }
      public void decriment() { counter--; }
    }thanks.
    Edited by: kogose on Feb 23, 2009 7:13 PM

    tensorfield wrote:
    jverd wrote:
    tensorfield wrote:
    kogose wrote:
    what exactly does this mean?It means you're complicating things.
    If a method is synchronized, it is. You don't need to go beyond that. The method is synchronized.Not true. You have to know what it means for a method to be synchronized. Often people come in with the erroneous impression that it somehow prevents you from using or accessing the object in any other thread.It's very simple. If a synchronized method is called at the same time from many threads only one call will be executed at a time. The calls will be lined up and performed one after the other in sequence.
    AND because synchronization is on a per object basis, when one synchronized method is being called from one thread, all synchronized methods of that same object are blocked for calling from other threads.
    Simple as that.No, it's not that simple, and as stated, that is not correct. In particular, you didn't mention that for an instance method, all the various threads have to be trying to call instance methods on the same object in order for execution to be sequential.
    You really can't understand Java's syncing without understanding how it relates to locks, and what it means for a method to be synchronized in terms of which lock it acquires.
    Edited by: jverd on Feb 25, 2009 2:47 PM

  • How to call a Java method in a C consoleapplication?

    I have to call a void method of a javaclass using a c consoleapplication. No argument are passed to it.
    I can't make an object of that class..
    This is my implementation in c (using JNI):
    void update(void)
         classn = "<name>";
         cls = (*env) ->FindClass(env, classn );
         if (cls == 0)
    printf(" Can't find class %s\n", classn );
         mid =
    (*env)->GetMethodID(env, cls, "<methodname>", "()V");
         (*env)->CallVoidMethod(obj, env ,m id);
    This goes wrong...
    The problem is that I have no jobject (obj) of the class, because I don't want one...I don't need one. How can I call that void method without an object and only using the classname..??

    You have to make the java method a static method, and use CallStaticVoidMethod.
    "static" means that the method belongs to the class, and not an object of that class.

  • Missing method.

    import acm.program.*;
    import acm.graphics.*;
    public class Image extends GraphicsProgram {
         public void run() {
              GImage image = new GImage("Image.jpg");
              int[][] array = image.getPixelArray();
    }I'm trying to compile this code but when I do I get this error
    Image.java:8: cannot find symbol
    symbol : method getPixelArray()
    location: class acm.graphics.GImage
    int[][] array = image.getPixelArray();
    ^
    1 error
    using this classpath "javac -cp .;acm.jar Image.java"
    the acm.jar is in the same directory as the java file and it works fine for all other uses.
    does this just mean that the method simply isn't in the package?
    I've cheked the javadoc http://jtf.acm.org/javadoc/student/index.html and there's no mention of the method.
    So am I doing anything wrong or is it just not there?

    JoachimSauer wrote:
    FyodorK wrote:
    Image.java:8: cannot find symbol
    symbol : method getPixelArray()
    location: class acm.graphics.GImage
    int[][] array = image.getPixelArray();
    ^
    1 errorAs you've guessed that means that the GImage class doesn't have such a method.
    I've cheked the javadoc http://jtf.acm.org/javadoc/student/index.html and there's no mention of the method.
    Ok, it doesn't work and the documentation doesn't mention that it should work.
    What makes you think that this method should exist?In the textbook I'm working from it says the GImage class in the acm.graphics package has a method called getPixelArray() that returns a two dimensional array containing the colour values for all the pixels in a given image.
    I found a link from a standford website, where the guy who wrote the book is a professor, that uses the method too.
    http://www.stanford.edu/class/cs106a/slides/Arrays/GrayImage.txt
    how annoying, this isn't the first problem i've had with these packages.

  • How to call a standard BOR method in a program.

    Hi All,
    How to call a standard BOR method in a program. For example I have to call BOR method ISUSMORDER.Release in my program but don't know how to call.
    Also, plz tell me how to capture the Exceptions in case of BOR method.
    Plz help me out in this.
    Thanks,
    Mithilesh

    Would be easier (however not always possible), to determine the functionality of this method and call that in your program. I mean, normally this method calls a BAPI, or function module (or a transaction). Have a look at the coding inside of the method, and try and use this.

  • Abstract method which when implemented will have different parameters

    Hello to all,
    I have an assignment but not looking for someone to do it for me. I am only searching for a suggestion on how to do the following.
    Imagine having an application that needs to provide an estimate of the rent for different buildings.
    Basically I start with by having a class name Building. This class has an abstract method called estimateRent.
    I then create two classes that extend the class Building which are named Apartment and House. Both need to have the method estimateRent.
    However the problem is that the rent for the Apartment is calculated on the nights passed in the flat and the people in it, while the rent for the House is just calculated on a month bases.
    This means the estimateRent method requires to have different parameters depending if it is implemented inside the Apartment class or the House class.
    Now I only know of two options.
    The first option is to not declare the estimateRent method as an abstract method inside the Building class and just implemented inside the Apartment and House with different parameters. I do not like this option since in the future if a new Building comes in then I would like to impose the fact that that object needs to have a calculate method.
    The second option is to make the estimateRent method as abstract inside the Building class however takes a parameter of either a String array or else a Map. Then the estimateRent within the Apartment class would search for the elements tagged as nights and people, and the House class would only search for the elements tagged as months!
    However do not know if there are any other, better ways on how to do this. I am using Java 1.4 however if you only have answers for Java 5.0 then please post them again since I always like to learn something new :)
    Thank You for any comments.
    tx

    The implementation changes, yes.Yes that I could understand in the Strategy Pattern (in the document I read it was being compared with the Template Pattern).
    Then you need to refactor your design.I tought about that, however if you read my first post you will notice that I have different criteria on which the costs need to be estimated. While the costs for a flat are estimated on the people staying in and nights slept there, the costs for the house are based only on the months stayed there regardless of the people living in. Now for me I feel that it is bad programming practice to create one method that can have all the parameters required for any scenario. I mean the following is NOT something I am going to do:
    estimateCosts(int nights, int people, int months ... etc);
    That's not a very elegant way of going about it.
    What is the "Context" going to have?Yep I agree, but so far my limited brain has only come up with that! I am open to any other sugestion! always if i understand it first!
    Basically the Context would better be named as Criteria and it would be an interface as follows:
    interface Criteria{}
    Then I would create two classes that implement the Criteria object as follows:
    class AppartmentCriteria implements Criteria{
    public Result estimateCosts(int nights, int people);
    class HouseCriteria implements Criteria{
    public Result estimateCosts(int months);
    Now when I recieve the inputs, depending on the scenario the Criteria is typecasted and the correct parameters passed and we recieve the Result.
    I feel the above sucks since I am not seeing it as an object oriented way of doing this out! Is there any other sugestions! The refactoring thing I am intrested in! however really I can not see how such a call to that method could be refectored!
    Thank You,
    tx.
    PS: Sun has blocked my other account as well, and this time they did not even send me an email to confirm that I was registered successfuully :( Is there someone I can contact on this? I guess next time I will reply with tx53m :)

  • Static method

    If I'm trying to write a method that accepts a String argument and prints it on the screen, but the method itself is supposed to return nothing, what exactly does that mean???
    This is the question itself:
    Write the definition of a class� Telephone . The class� has no constructors� and one static� method� printNumber . The method� accepts a String�argument� and prints it on the screen. The method� returns nothing.
    However, all I really am asking for is maybe some tips on understanding the concept itself. I've been looking through the tutorials online, but I just haven't found anything that explains this outright.
    To give an idea of where I am going completely, embarassingly wrong, here is what I tried to write (which I know!! it's probably far off!):
    import java.util.Scanner;
    public class Telephone
    void printNumber ()
    String lineIn;
    Scanner scan = new Scanner(System.in);
    lineIn = scan.nextLine();
    System.out.println(lineIn);
    Now please, laugh quietly to yourself and then help :P
    Thanks!

    the method itself is supposed to return nothing, what exactly
    does that mean???
    Now please, laugh quietly to yourself and then help
    :P
    Thanks!"return nothing" most probably means that the method has a void return type, and no return statement in the body of the method. Looks like you got that part right in your code.
    I would guess that the other part would be solved by adding the static key word to your method declaration. It should also probably be public, so that other classes can call it.
    So:
    public static void printNumber()
       // body of method goes here
    }Good luck,
    RD-R
    � {�
    Mon Mar 07 00:38:07 EST 2005
    Pseudo-random saying number 525 of 635
    A limerick packs laughs anatomical
    Into space that is quite economical.
            But the good ones I've seen
            So seldom are clean,
    And the clean ones so seldom are comical.

  • Service Method trouble

    I'm having trouble calling upon a service Class method (Convert.java)i've created which:
    1. Receives an Uppercase String
    2. Converts the Uppercase String to a lowercase String.
    3. Converts the now lowercase string into a single char.
    4. Returns the char back to Main.java
    Convert.java
        public class Convert {
        public static char con(String txt) {
        txt = txt.toLowerCase();
        char done = txt.charAt(0);
        return done;
    }how would I send data to this service class method from a different module?

    Are you asking how you'd invoke this method from a different class? You're using words with big connotations for what looks like a simple problem. It's not clear what you mean by "service method" other than just a static method, either.
    If you want to invoke the method, just put the class name in front of it:
    char c = Convert.con("Here is a string");Both the class and the method are public so you should have no trouble, unless you're using packages inconsistently.

  • Overriding methods and attributes

    can a subclass override a method in its superclass even if it changes the method`s access modifier? can attributes be "overriden" as well?for instance:
    //superclass
    class A implements Serializable{
    public int attr;
    public void run () {
    //subclass
    class B extends class A {
    transient int attr;
    private void run() {
    }will public int attr of class A be "overriden" by transient int attr of class B? and did class B override the run method?
    thanks!

    while overriding a method, you cannot make the method being overriden more 'private'. That means if a method is public in the parent class, you can not make it package or protected in the child class and so on.
    As far as overriding the attributes is concerned, I haven't seen anything like that and I think it's not allowed. The transient int in B is different that the public int in A.
    Correct me if I am wrong.
    Thanks.

  • Non-static method/object cannot be referenced from a static context...?????

    What does this mean. I know about static, but I don't understand why I get this so many times.
    I try to do something pretty normal and this is what I get a lot of times. I mean: the main() method should be static right? Then what good is the main() method if you cannot let it do stuff for you like this:
    public class Test extends JFrame
        public Test
            setSize( 100, 100 );
            show();
    public static main( String args[] )
        Test window = new Test();
        draw();
    public void draw()
        blablabla whatever I want to do, a lot of times I can't.....
    }Why is this, what is the reason for Java to forbid this and what can I do about it?

    Your draw() method, since it isn't defined as static is considered by Java to be part of your Test object; hence, it can only be invoked in the context of an existing instance of your object. In other words, any Java program that wanted to use your draw() method would have to create an instance of your Test class using something likemyTest = new Test()Your main method, however, is something different. Since you want to execute your class as a program, the Java run-time environment needs to have standard starting point. This starting point is the main method. The problem is that the main method must be static, because the run-time environment cannot be expected to know beforehand the correct way to create an instance of your class so that non-static methods can be invoked. The drawback is that your main method can only directly access methods that are defined as static.
    There are two possible solutions to this problem, and which of the two you want to use depends on the object-oriented nature of your program.
    On the one hand, if your draw() method is closely tied to the object itself, if the draw() method is actually drawing your object or a part of it, it should be left as an instance method, and you should simpy use the instance of the object you created in your main method:public static main( String args[] )
        Test window = new Test();
        // maybe some code to generate something to draw???
        window.draw();
    }This is what I think you are trying to do.
    On the other hand, if your draw() method was some kind of universal method that didn't depend in any way on the current configuration of your instance, you could simply define draw() as static at which point your main method (or a method in an external class) could invoke it directly, without a corresponding instance. But if you did that, the draw() method itself would only be able to access static variables and methods.
    Doug

  • Which Method of Making USB Mavericks Installer?

    I use Mavericks OS X 10.9.1.  Which of the following methods should I use to make a USB Mavericks Installer/Re-Installer?:
    1. How to Create an OS X Mavericks USB Installation Drive: lifehacker.com/how-to-create-an-os-x-mavericks-usb-installation-drive-145028002 6
         (this method performs a "clean install") do I need to perform a clean install?
    2. How to make a bootable install of Mavericks on Flash USB Drive? - MacRumors Forums: forums.macrumors.com/showthread.php?t=1649986
         (does this method performs a "clean install?") do I need a clean install?
    3. The MacRumors Forums talks about "a copy of OS X Mavericks GM."  What is a "OS X Mavericks GM?"  What does GM mean?

    Both methods are the same and are the steps Apple gives users to create a bootable USB drive with the Mavericks installer.
    You only need to perform a clean install if OS X Mavericks is not working correctly. If this is not the case, you will just be reinstalling OS X Mavericks and you will keep all your files. To perform a clean install, first you need to erase the hard drive with Disk Utility.
    Angel Llorente wrote:
    3. The MacRumors Forums talks about "a copy of OS X Mavericks GM."  What is a "OS X Mavericks GM?"  What does GM mean?
    Ignore that. OS X Mavericks GM was OS X Mavericks Golden Master, which was the final version Apple gave to developers. That version is not available anymore, and you will be downloading 10.9.1 from the Mac App Store.

  • Use of a method in class CL_GUI_ALV_GRID

    Dear all,
    I have a requirement in which i have to use the method - SHOW_GRAPHICS of the class - CL_GUI_ALV_GRID, but the problem is there is a red traffic light in front of the method. Now my dilemma is how to turn that light green so that i can use this method.
    Kindly help.
    Thanks,
    Saurabh Chauhan.

    The red light says that it is a private method .. So it means that this method can not be used out side the class !
    There is a way out ... Create your own class that ZCL_GUI_ALV_GRID that inherits the CL_GUI_ALV_GRID.
    Here you create a public method my_method and in this method call the private method.
    Warning : If the architect had created that method as a Private one ... he must have done it for a reason .. may be this method has access to some attributes that must not be made available to the outside world ... which might cause serious damage !!
    Rule 1: Trust the architect .. If he has made it private.. it is for a reason... and Ideally there can not be any case why some one else would use this method out side the class..
    Hint: May be it is possible to achieve the same without using this method (in a different way) ..
    Regards,
    Varun.

Maybe you are looking for

  • PI 7.0 Installation

    Hi All I am experiencing a strange problem after completion of PI installation  which is describe below I am able to login with Admin account 'J2EE_ADMIN' in Visual Admin after restarting the application but after 10-15 minutes it starts giving error

  • When I click on firefox icon there's no window that opens but the tool bar and the url are at the top of the page???

    I cannot get a window, check my email, go to any of my bookmarks, etc. I am forced to use Safari, but I need firefox for certain classes and websites.

  • [AS] How to test the presence of at least one table?

    Hello everyone, I would like to test for the presence of at least one table in a document before starting a process (on edge strokes).  I found this, but I do not know if this is really effective:                               set CountOfTables1 to c

  • Two questions...help

    Hi all, I have two questions about folders in Finder. In finder when you when you want to move a file or folder, the only option is to copy the folder and paste it in the desired location, but the original file remains in the original place too, so y

  • What R the dimensions of the box of Sharp Led TV 60''?

    What R the dimensions of the box of Sharp Led TV 60''? If I'm not mistaken the dimensions of the BOX (not the screen) is not mentioned in the specs. Plz take a look : http://www.bestbuy.com/site/Sharp+-+AQUOS+-+60%22+Class+%2860-1/32%22+Diag.%29+-+LE