Is it possible to call Listener's methods remotely ?

Hello All,
These methods belongs to ActionListener and PropertyChangeListener i need to realize these two cases and similar with other swing classes PropertyChangeEvent , ActionEvent.
The server should call this method for each client, when ever some change occur in model:
public void propertyChange(PropertyChangeEvent evt) {
        for (AbstractViewPanel view: registeredViews) {
            view.modelPropertyChange(evt);
    }in case of an event on one client, each client actionPerformed() should be called from server:
@Override
public void actionPerformed(ActionEvent e)  {
}any help really appreciated,
jibbylala

Jibbylala wrote:
Thanks, is there any other alternative that can be use, i wanted to create collaborative GUI. when some event occur on one client other clients also listen and act.A better approach is to use JMS Topics. A event producer can pushing messages, event objects or even command objects and the clients who are interested in these message can subscribe to them.

Similar Messages

  • Is it possible to call a class method using pattern in ABAP editor.

    Hi,
         Is it possible to call a class method using pattern in ABAP editor.
    Thank U for Ur time.
    Cheers,
    Sam

    Yes,
    Click patterns.
    Then choose Abap objects patterns.
    Click on the Tick
    It will give a new screen
    Here Give the name of the class first.
    Then the object (instance of the calss)
    And finally the method ..
    it will give you the pattern
    Hope this helps.

  • Is it possible to call a custom method in App Module from a backing bean?

    I would like to know if a custom method in App Module can be called from inside a backing bean.
    I am not sure if it is logically right to call, from a backing bean, a custom method in App Module. But would like to know if that makes sense or if it is possible.

    Hi..
    Yes it is possible.You have to add that method for client interface of AppModule.Now you can see that method in Data Controls(Refresh the data control). To call this method using bean it should add as method action to bindings(Click Bindings>+>methodAction>and Create action binding).
    Now you can call this method in bean class.
    Check following example use this concept to execute view criteria
    http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html

  • Is it possible to call a java method from servlet

    Hi All,
    I am trying to import a java class to my servlet and call a method of that class, is this possible. I am getting an error while importing the class.
    I am using tomcat, have put my class files in th path
    \WEB-INF\classes\com\kiran
    My java goes like this
    package com.kiran;
    import java.sql.*;
    import javax.sql.*;
    public class DbCon
    { Connection con=null;
    public Connection getCon()
    -----return con;
    catch(Exception e){ return con; }
    and my aim is to call getCon() from my servlet. which is as follows
    package com.kiran;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import com.kiran.DbCon;
    public class check extends HttpServlet
    DbCon db;
    i am not able to compile my servlet, err is --> cannot find symbol DbCon..
    How can i import the class, do i require any entries in web.xml ?
    expecting your advice..
    Thanks in advance
    Best Regards,
    Kiran

    Ok, first off, if you are testing in tomcat (and as you said you are placing the class files in the path), you already compiled this classes, right? Otherwise I don't see how you placed your classes in /WEB-INF/classes/. Note that you will need two class files (based on your code. If not, then I'm missing part of the question. Typically, your IDE will help you with this problem a lot. The only thing that seems confusing is the catch (Exception e) statement which needs to be as part of a method (I assume this is a typo on your part).
    If your problem is at runtime, don't forget to configure your web.xml to see your servlet.

  • How to call a bean method through a javascript function

    I dont discover any problems calling the bean method in this maner:
    <%= helpdesk.data() %>
    But, when I use a Button Onclick= to call the script function and which then is going call my bean method
    an error on the page is reported!
    I have include som code which gives you the idea of what Iam searching for. And is it possible to call
    the bean method without doing from a new jsp page?
    If you have any suggestions to why it doesnt work, please let me know.
    I use Apache Tomcat 4.0
    Best regards Micah.
    <jsp:useBean id='helpdesk' scope='application'
    class='helpdesk.testdb'/>
    <html>
    <head>
    <script language="javascript">
    function broadcast()
    helpdesk.data();
    </script>
    </head>
    <body>
    <input type="button" value="Broadcast" onclick= broadcast()>
    </body>
    </html>

    It's actually quite simple:
    Beans run server-side
    Javascript runs client-side
    So you will never be able to run server-side-code thru the client...

  • How to call a static method in a class if I have just the object?

    Hello. I have an abstract class A where I have a static method blah(). I have 2 classes that extend class A called B and C. In both classes I override method blah(). I have an array with objects of type B and C.
    For every instance object of the array, I'm trying to call the static method in the corresponding class. For objects of type B I want to call blah() method in B class and for objects of type C I want to call blah() method in C class. I know it's possible to call a static method with the name of the object, too, but for some reason (?) it calls blah() method in class A if I try this.
    So my question is: how do I code this? I guess I need to cast to the class name and then call the method with the class name, but I couldn't do it. I tried to use getClass() method to get the class name and it works, but I didn't know what to do from here...
    So any help would be appreciated. Thank you.

    As somebody already said, to get the behavior you
    want, make the methods non-static.You all asked me why I need that method to be
    static... I'm not surprised to hear this question
    because I asked all my friends before posting here,
    and all of them asked me this... It's because some
    complicated reasons, I doubt it.
    the application I'm writing is
    quite big...Irrelevant.
    Umm... So what you're saying is there is no way to do
    this with that method being static? The behavior you describe cannot be obtained with only static methods in Java. You'd have to explicitly determine the class and then explicitly call the correct class' method.

  • Calling a bean method on select of Combo box item

    Hi
    On select of Combo box item in a form, text fields in the same form should be populated
    dynamically.Is it possible to call a bean method which does this,by calling onSelect() method
    of combo box ?
    Thanks in advance,
    Sridevi

    Uff, sorry!
    I ment that you write some code for the "onSelect" event which sends a request to the server with the selected value: onSelect="self.location.href='<%= request.getRequestURI()%>?selectedVal= ' + this.selectedIndex;"

  • Unable to call a native method

    Hi All,
    I am trying to call a native method tapi3Init from tapi3.dll present in Windows\System32 folder. But I get an error as below.
    Exception in thread "Main Thread" java.lang.UnsatisfiedLinkError: DLLCall.tapi3Init
         at DLLCall.main(DLLCall.java:25)
    I have verified my java.library.path and it has the path in it. I have cross verified by typing a wrong dll name and that gave a relevant error. So, please let me know what is going wrong?
    Also, is it not possible to call a native method from a dll which is not formed by using the javah header file?
    Thanks.

    native method tapi3Init from tapi3.dllSo that would be your JNI method.
    Exception in thread "Main Thread" java.lang.UnsatisfiedLinkError: DLLCall.tapi3Init And you are not calling it. Standard reasons apply.
    - library not loaded
    - Signatures are different.

  • Calling administration api method

    iS IT POSSIBLE TO CALL ADMINISTRATION API METHODS SUCH AS GETSERVERSTATS() etc from server side code....

    I'm still facing problem,,
    i need to check the uptime and the number of users connected to the remote server..
    this is my code
    application.onConnect = function(client,name)
         nc_poll=new NetConnection();
         nc_poll.connect("rtmp://abcd.com:1111/admin","usrnmame","password");
    function onGetServerStats(result)
        var dataobj=result.data;
        trace("on getserver");
        trace(dataobj.up_time);
        trace(result.level);
    nc_poll.call("getServerStats",new onGetServerStats);
    // im getting the ongetserver log in the log but the other traced values..
    its showing that
    "result has no properties"

  • Is is possible to call a function or method before JVM exits ??

    Hi All,
    Is is possible to call a function or method before JVM exits where System.exit() is used.
    I am calling a program where System.exit is used. i need to call a function before the JVM exits.
    Please help me.
    Thanks,
    J.Kathir

    How to call the method ? Did i have to call the shudown hooks method in my main class ?
    Is it possible to have in subclass?
    is the below code is correct ? i am calling a class before System.exit is called....
    java.lang.Runtime.getRuntime().addShutdownHook(...My Own Class()....)

  • Is it possible to call methods from another class from within an abstract c

    Is it possible to call methods from another class from within an abstract class ?

    I found an example in teh JDK 131 JFC that may help you. I t is using swing interface and JTable
    If you can not use Swing, then you may want to do digging or try out with the idea presented here in example 3
    Notice that one should refine the abstract table model and you may want to create a method for something like
    public Object getValuesAtRow(int row) { return data[row;}
    to give the desired row and leave the method for
    getValuesAt alone for getting valued of particaular row and column.
    So Once you got the seelcted row index, idxSelctd, from your table
    you can get the row or set the row in your table model
    public TableExample3() {
    JFrame frame = new JFrame("Table");
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {System.exit(0);}});
    // Take the dummy data from SwingSet.
    final String[] names = {"First Name", "Last Name", "Favorite Color",
    "Favorite Number", "Vegetarian"};
    final Object[][] data = {
         {"Mark", "Andrews", "Red", new Integer(2), new Boolean(true)},
         {"Tom", "Ball", "Blue", new Integer(99), new Boolean(false)},
         {"Alan", "Chung", "Green", new Integer(838), new Boolean(false)},
         {"Jeff", "Dinkins", "Turquois", new Integer(8), new Boolean(true)},
         {"Amy", "Fowler", "Yellow", new Integer(3), new Boolean(false)},
         {"Brian", "Gerhold", "Green", new Integer(0), new Boolean(false)},
         {"James", "Gosling", "Pink", new Integer(21), new Boolean(false)},
         {"David", "Karlton", "Red", new Integer(1), new Boolean(false)},
         {"Dave", "Kloba", "Yellow", new Integer(14), new Boolean(false)},
         {"Peter", "Korn", "Purple", new Integer(12), new Boolean(false)},
         {"Phil", "Milne", "Purple", new Integer(3), new Boolean(false)},
         {"Dave", "Moore", "Green", new Integer(88), new Boolean(false)},
         {"Hans", "Muller", "Maroon", new Integer(5), new Boolean(false)},
         {"Rick", "Levenson", "Blue", new Integer(2), new Boolean(false)},
         {"Tim", "Prinzing", "Blue", new Integer(22), new Boolean(false)},
         {"Chester", "Rose", "Black", new Integer(0), new Boolean(false)},
         {"Ray", "Ryan", "Gray", new Integer(77), new Boolean(false)},
         {"Georges", "Saab", "Red", new Integer(4), new Boolean(false)},
         {"Willie", "Walker", "Phthalo Blue", new Integer(4), new Boolean(false)},
         {"Kathy", "Walrath", "Blue", new Integer(8), new Boolean(false)},
         {"Arnaud", "Weber", "Green", new Integer(44), new Boolean(false)}
    // Create a model of the data.
    TableModel dataModel = new AbstractTableModel() {
    // These methods always need to be implemented.
    public int getColumnCount() { return names.length; }
    public int getRowCount() { return data.length;}
    public Object getValueAt(int row, int col) {return data[row][col];}
    // The default implementations of these methods in
    // AbstractTableModel would work, but we can refine them.
    public String getColumnName(int column) {return names[column];}
    public Class getColumnClass(int col) {return getValueAt(0,col).getClass();}
    public boolean isCellEditable(int row, int col) {return (col==4);}
    public void setValueAt(Object aValue, int row, int column) {
    data[row][column] = aValue;
    };

  • Is it possible to call methods of JAVA objects from ABAP?

    Hi all,
    Does anyone know if it is possible to call methods of java classes from ABAP?
    Regards,
    Sukru

    Hi,
    Yes we can access the classes of JAVA in ABP.
    This is posible from version ECC 6 onward with NETWEAVER atrhcitecuture.
    Pls go through this link-
    http://help.sap.com/saphelp_nw04s/helpdata/en/84/54953fc405330ee10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/e1/b5443e02a9ab4186a6e1240a9a2455/frameset.htm
    Here also we use the JCO connector  objects
    These clearly show the methods to use JAVA.
    <removed_by_moderator_together_with_points>
    Regards
    Chandralekha
    Edited by: Julius Bussche on Jul 8, 2008 5:58 PM

  • Is it possible to call any Managed Bean method from af:goLink

    Hi,
    I am using RichGoLink component.
    Is it possible to call a managed bean method on click of the af:goLink? I want to provide some validations when user clicks on the goLink.
    There is no any actionListener provided.
    Thanks in advance.

    Hi,
    I am able to resolve my second problem also.
    i wanted to set the "destination" of the goLink on the fly. To do this I created a custom componnt by extending the RichGoLink and I override the encodeBegin method in that class. In this method i check my condition and then set the "destination" property.
    I am still using the clientListener and the serverListerner to do some further testing that i wanted to. Here one thing you have to keep in mind that. In the javascript function that we are calling in the clientListener should not do the "cancel" on the event object, if you do so it will not navigate to the required position.
    Thanks for the way you showed to resolve my problem. Hope you understand the way i worked for this solution.

  • How to call a custom method in a parent container.

    I have an MXML component that defines the method:
    public function showAllGlyphs(spots:Array):void { ... }
    There is a child component of this MXML componet called
    DataClip, which has
    a method that needs to call the parent method:
    parent.showAllGlyphs(pushPins);
    I get a 1061 error when compiling. I understand the problem.
    The compiler
    thinks the paret is a static class, and does not know about
    the extention.
    My question is how to I cast or otherwise reference this
    method in the
    PARENT?
    Severity Description Resource In Folder Location Creation
    Time Id
    2 1061: Call to a possibly undefined method showAllGlyphs
    through a
    reference with static type
    flash.display:DisplayObjectContainer.
    DataClip.mxml Transitions line 32 August 21, 2006 3:07:28 PM
    169

    I understand why what you say is the correct design pattern
    (much more
    modularity and the potential for re-use).
    In my case, it still might make sense to use .parentDocument
    (my problem was
    not understanding the difference between .parent and
    .parentDocument)
    Although I still don't understand why .parentDocument does
    work.
    I have a bunch of purely GUI oriented subComponents of a
    .parentApplication.
    The parentApplication has a custom AS-only module that does
    the "business
    logic, network connections, etc).
    Basically, I want a module (Singleton Class) that is
    accessible from all GUI
    subcomponents that provides general utility functions. It
    can't be
    instatiatiated multiple times. So there needs to be one
    global place for it.
    It does not really make things clear if everything is done
    via an event
    paradigm. (Well, maybe to me, but I have a Ph.D. in CS so I
    am tainted) I
    want this clear to the average programmer.
    ===============================
    Dr. Yechezkal Gutfreund
    Team ACE for Mobile Devices
    ===============================
    "peterent" <[email protected]> wrote in
    message
    news:[email protected]...
    > As a rule of thumb, a child should never call functions
    in its parent. It
    > is
    > possible, it just not a very good programming practice.
    > If a child needs the parent to do something, the child
    should dispatch an
    > event. In your child, declare an event using Metadata:
    >
    > <mx:Metadata>
    > [Event("showGlyphs")]
    > </mx:Metadata>
    >
    > The child should have a public property that the parent
    can access to
    > handle
    > the event:
    >
    > public var pushPins:Array;
    >
    > When the child needs the parent to do this, have the
    child set the
    > pushPins
    > array, then dispatchEvent( new Event("showGlyphs") );
    >
    > In the parent, on the child's tag, have it listen for
    the event and
    > execute it:
    >
    > <MyChild
    showGlyphs="showAllGlyphs(event.target.pushPins)" />
    >
    > I know this seems like a lot more work, but it is a much
    better strategy
    > than
    > having children reach up and into the parent's code.
    >

  • How to call a C function calling a Java Method from another C function ?

    Hi everyone,
    I'm just starting to learn JNI and my problem is that I don't know if it is possible to call a C function calling a Java Method (or doing anything else with JNI) from another C function.
    In fact, after receiving datas in a socket made by a C function, I would like to create a class instance (and I don't know how to do it too ; ) ) and init this instance with the strings I received in the socket.
    Is all that possible ?
    Thank you very much for your help !

    Hard to understand the question, but by most interpretations the answer is going to be yes.
    You do of course understand that JNI is the "API" that sits between Java and C and that every call between the two must go through that. You can't call it directly.

Maybe you are looking for

  • Is it possible to install & operate CS3 web Premium On A Vista 64 Bit O.S.?

    I am using a H.P. Pavillion Desktop, with 4 gigs of Ram & a 500 Gig Hard drive,  partitioned into: ('C', as primary Drive, Free space: 318 Gigs ) & ('D' as my factory image Drive, Free space: 1.47 Gigs). Operating System Windows Vista, Home Premium,

  • What is renderingContext? and how can I get it?

    Hi all, I've been trying to make a dff.segment required dinamically in the controller and I've go it with the help of this forum and sweating a bit... My problem is, a method of the OAWebBean class I use in the controller is deprecated and the sugges

  • HDDs are missing in the installation

    Hello, some hours again I tryed to install Oracle Linux 6 on a Dell PowerEdge R410. But in the accordingly step to chose the Partition where the system is to be installed the HDDs are missing. In the Controller Bios I can see the correctly configurat

  • KEA0 activate company code currency

    Hi every body ! Can some one tell me what would be the program to generate prior values for company code currency in COPA ? Actually the controlling area is only customizing in group currency. Thanks by advance

  • Can't open X5 projects in RoboHelp 7 for Word

    After upgrading from X5 to 7, I tried to work on some RoboHelp for Word projects sent by a colleague who created them in X5. He and I are both working with Word 2003. The Explorer stops responding when I try to open one of these projects or one of th