Communication between classes ???

Hi
I am facing problems in establishing communication between java classes.
My application consists of 4 java classes in following sequence.
Sockets main() of java UI called JavaUI calls execute class;s func Execute()
Client ---------------------� server---------------------------------------- -� java UI appln ------------------------------------------------------------------� execute button.
When execute button is clicked ANT tools are called and executed. I want some mechanism by which my execute class notifies my java UI application about the successful completion of execution, which in turn tells my server and then server should acknowledge client about the same.
How can I achieve this back ward communication in java.
Message was edited by:
javaUser10

i have written a swing application in which does program does the following.
1. Server Application (can be deploy on the server)
a. checks an engine if it is still working by checking the database every minute
b. if not working sends a string of message to a dedicated port
2. Client Application()
a. retrieves messages from the dedicated port
b. engine has been stopped, client application can start the engine
maybe you can do the same for your application

Similar Messages

  • Java Communication Between Classes and JFrame JDialog

    i have written a standalone connect 4 game.
    next i would like to be able to play it over network and also have a chat function.
    connect 4 GUI (JFrame) holds -> connect 4 game model
    i would like to implement connect 4 network GUI(JDialog) (here the user can choose to act as a server or client) that holds Network API.
    and finally a Chat GUI (JDialog) to exchange messages.
    my question is how do i implement inter class/GUI communication? when a network message is received it ought to be delivered to the right receiver (game / chat) also messages sent from chat / game transmitted to remote machine.
    i have looked into inner classes but was told it is a bad idea to implement so much with in single class and i did not like this idea a lot either.
    i have written another game battleships in C# and it uses delegates to accomplish this task but sadly im informed that delegates are not available in Java.
    im a beginner and at the moment exploring options so im open to your guidance.
    thank you.

    Addition to my above submission
    To clarify, I'll offer the US$20 to the FIRST person who offers me a workable solution to the problem, not to everyone!!!
    JMGRAHAM

  • Having trouble communicating between classes

    Ok can someone just code out this simple example so I can figure it out for my project?
    you have class A, B, and C
    class A defines a JButton........JButton b = new JButton();
    class B has some code(anything) that is excecuted when the button is pressed
    class C also has some different code that is excecuted when the button is pressed
    Also class C has a variable defined File file; that is used in a method in class B
    basically how do you connect the classes so that they know what variables are what?

    Double post.
    http://forum.java.sun.com/thread.jspa?threadID=696934&tstart=0
    Please be more specific on why you didn't get any useful replies from this thread (or if you just posted it here so that more people could read it).

  • Communicating between linked classes

    I have been struggling with what seems to be simple concept in ActionScript 3.0 - how to communicate between classes. I have a very simple experiment with two movieclips on the stage. They are named YellowBox and RedBox in my library. I have linked the following code to the YellowBox movieclip:
    package
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
        public class YellowBox extends MovieClip
            public function YellowBox()
                this.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
            public function rollOverHandler(event:MouseEvent):void
                this.x = x + 3;
    What I would like to do is call the YellowBox() function on my RedBox MovieClip with the following code:
    package
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
        public class RedBox extends MovieClip
            public function RedBox()
                YellowBox();
    I get the following message when I compile: 1136: Incorrect number of arguments.  Expected 1.
    Any help explaining the process of communicating between classes would be greatly appreciated. This experiement is just an attempt to gain a greater understand of how classes can access and use each other's methods. Thanks!
    Also, any tips on inserting code in a more readable fashion as I have seen in other posts ...

    Its a concept called Composition, where your class will use Delegation to yellow class to perform a task.
    Key Object Oriented Terms when you are ready to know more about class's and their structures
    Composition means that a class has another class in its posession, and delegation is when a class tells another to do something.

  • COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET: US$20 AWARD FOR SOLUTION!

    COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET PROBLEM (Easy Filter Java Applet) -
    US$20 TO ANYONE WHO CAN RESOLVE THE PROBLEM
    To forum visitors:
    I am prepared to pay a standard shareware fee of US$20 to a user who can resolve this technical problem.
    If your advice resolves the problem, I'll forward the payment to your postal address (include your
    address with your reply, and also your email address)
    I am attempting to enable a HTML button (using Javascript's onClick command) to directly input a number into one of the parameter text boxes in the Easy Filter Java applet (ie, enter a new color value number in the text field of the standard Colors Multiplicator Filter interface).
    The applet is Freeware and can be downloaded at: http://www.javazoom.net/applets/easyfilter10/EasyFilter10.html
    (It is a very effective bitmap display and editing utility)
    To achieve this, I am trying to access the part of the applet that defines and sets the textbox. The text box is defined in the .class file by accessing the parameter details in the genericfilter.txt file (accompanies the .class files). I need to access 'private String appletInitialize()' and then one of the 'textFieldParameters' which sets the textbox.
    I understand the basic syntax for referencing the applet:
    document.appletname.setString("An example"). However, accessing the text fields in this applet is more complex!!
    Please can you recommend the correct Javascript syntax to achieve communication with the applet.
    Thank you for your kind assistance.
    JM Graham
    [email protected]
    The Java source code for the applet: EasyFilter.class
    # Easy Filter - E.B/JavaZOOM 1999 #
    # Contact: [email protected] #
    # http://javazoom.hypermart.net #
    /* Originally compiled from EasyFilter.java */
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.applet.Applet;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.image.MemoryImageSource;
    import java.awt.image.PixelGrabber;
    import java.util.Vector;
    public synchronized class EasyFilter extends Applet implements KeyListener
    private String paramFileName;
    private Color bgColor;
    private Color fgColor;
    private Color parColor;
    private Color sepColor;
    private Color titleColor;
    private Color helpColor;
    private int WinWidth;
    private int WinHeight;
    private String title;
    private String logoFileName;
    private String originalImageFileName;
    private String filteredCaption;
    private String originalCaption;
    private Vector paramsName;
    private Vector paramsValue;
    private Vector paramsComment;
    private Panel panelParameters[];
    private Label labelParameters[];
    private TextField textFieldParameters[];
    private Label labelComments[];
    private int nbParameters;
    private ScrollPane scrollPaneParams;
    private Panel panelParams;
    private Image theLogo;
    private Image theOriginalImage;
    private Image theFilteredImage;
    private int theOriginalPixelArray[];
    private int logoWidth;
    private int logoHeight;
    private int imageWidth;
    private int imageHeight;
    private drawCanvas canvasTitle;
    private Panel panelTitle;
    private Label labelTitle;
    private Panel panelImages;
    private Panel panelOriginalImage;
    private drawCanvas canvasOriginalImage;
    private Label labelOriginalImage;
    private Panel panelFilteredImage;
    private drawCanvas canvasFilteredImage;
    private Label labelFilteredImage;
    private Panel panelHelp;
    private Label labelHelp;
    private int Yspc;
    private FilterImplementation theFilter;
    public void init()
    String string = null;
    string = appletInitialize();
    setBackground(bgColor);
    if (string != null)
    removeAll();
    setBackground(Color.white);
    setForeground(Color.black);
    Label label = new Label(new StringBuffer("Error: ").append(string).toString(), 1);
    Panel panel = new Panel();
    panel.add(label);
    add(panel);
    setLayout(new FlowLayout(1, 5, Yspc));
    public void keyPressed(KeyEvent keyEvent)
    panelHelp.removeAll();
    boolean flag = true;
    if (KeyEvent.getKeyText(keyEvent.getKeyCode()).equals("Enter"))
    for (int i = 0; i < nbParameters; )
    try
    paramsValue.setElementAt(new Double(textFieldParameters.getText()), i);
    i++;
    catch (NumberFormatException e)
    labelHelp.setText(labelParameters[i].getText() + ": Not a Number");
    flag = false;
    break;
    if (flag == 1)
    labelHelp.setText(" .... Running, please wait .... ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    theFilter.updateParameters(paramsValue);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    canvasFilteredImage.repaint();
    panelHelp.removeAll();
    labelHelp.setText("- Done -");
    else
    labelHelp.setText("- Press Enter to run the Filter -");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    public void keyReleased(KeyEvent keyEvent)
    public void keyTyped(KeyEvent keyEvent)
    private String appletInitialize()
    WinWidth = size().width;
    WinHeight = size().height;
    if (getParameter("bgcolor") == null)
    bgColor = new Color(0, 0, 40);
    else
    bgColor = new Color(Integer.parseInt(getParameter("bgcolor"), 16));
    if (getParameter("fgcolor") == null)
    fgColor = new Color(255, 255, 255);
    else
    fgColor = new Color(Integer.parseInt(getParameter("fgcolor"), 16));
    if (getParameter("sepcolor") == null)
    sepColor = new Color(158, 128, 128);
    else
    sepColor = new Color(Integer.parseInt(getParameter("sepcolor"), 16));
    if (getParameter("parcolor") == null)
    parColor = new Color(24, 24, 24);
    else
    parColor = new Color(Integer.parseInt(getParameter("parcolor"), 16));
    if (getParameter("titlecolor") == null)
    titleColor = new Color(255, 255, 0);
    else
    titleColor = new Color(Integer.parseInt(getParameter("titlecolor"), 16));
    if (getParameter("helpcolor") == null)
    helpColor = new Color(0, 255, 255);
    else
    helpColor = new Color(Integer.parseInt(getParameter("helpcolor"), 16));
    paramsName = new Vector();
    paramsValue = new Vector();
    paramsComment = new Vector();
    paramFileName = getParameter("paramfile");
    String string = readParams(paramFileName);
    if (string != null)
    return string;
    MediaTracker mediaTracker = new MediaTracker(this);
    theOriginalImage = getImage(getDocumentBase(), originalImageFileName);
    mediaTracker.addImage(theOriginalImage, 0);
    if (logoFileName != null)
    theLogo = getImage(getDocumentBase(), logoFileName);
    mediaTracker.addImage(theLogo, 1);
    try
    mediaTracker.waitForAll();
    catch (InterruptedException e1)
    return "Error while loading image";
    if (mediaTracker.isErrorAny())
    return "Error while loading image";
    if (logoFileName != null)
    logoWidth = theLogo.getWidth(this);
    logoHeight = theLogo.getHeight(this);
    imageWidth = theOriginalImage.getWidth(this);
    imageHeight = theOriginalImage.getHeight(this);
    theOriginalPixelArray = new int[imageWidth * imageHeight];
    PixelGrabber pixelGrabber = new PixelGrabber(theOriginalImage, 0, 0, imageWidth, imageHeight, theOriginalPixelArray, 0, imageWidth);
    try
    pixelGrabber.grabPixels();
    panelTitle = new Panel();
    canvasTitle = new drawCanvas();
    labelTitle = new Label();
    panelTitle.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelTitle);
    panelTitle.setBackground(bgColor);
    panelTitle.add(canvasTitle);
    canvasTitle.setImage(theLogo);
    canvasTitle.setBounds(0, 0, logoWidth, logoHeight);
    labelTitle.setText(title);
    catch (InterruptedException e2)
    return "Internal Error, Try RELOAD !";
    if (title != null)
    panelTitle.add(labelTitle);
    labelTitle.setForeground(titleColor);
    labelTitle.setFont(new Font("Dialog", 1, 14));
    panelImages = new Panel();
    panelOriginalImage = new Panel();
    canvasOriginalImage = new drawCanvas();
    labelOriginalImage = new Label();
    panelFilteredImage = new Panel();
    canvasFilteredImage = new drawCanvas();
    labelFilteredImage = new Label();
    panelImages.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelImages);
    panelImages.setBackground(bgColor);
    panelOriginalImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelOriginalImage);
    panelOriginalImage.setBackground(Color.black);
    panelOriginalImage.add("Center", canvasOriginalImage);
    canvasOriginalImage.setImage(theOriginalImage);
    canvasOriginalImage.setBounds(0, 0, imageWidth, imageHeight);
    labelOriginalImage.setText(originalCaption);
    labelOriginalImage.setAlignment(1);
    panelOriginalImage.add("South", labelOriginalImage);
    labelOriginalImage.setBackground(Color.lightGray);
    labelOriginalImage.setForeground(Color.black);
    labelOriginalImage.setFont(new Font("SansSerif", 0, 10));
    panelFilteredImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelFilteredImage);
    panelFilteredImage.setBackground(Color.black);
    panelFilteredImage.add("Center", canvasFilteredImage);
    theFilter = new FilterImplementation(paramsValue, theOriginalPixelArray, imageWidth, imageHeight);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    labelFilteredImage.setText(filteredCaption);
    labelFilteredImage.setAlignment(1);
    panelFilteredImage.add("South", labelFilteredImage);
    labelFilteredImage.setBackground(Color.lightGray);
    labelFilteredImage.setFont(new Font("SansSerif", 0, 10));
    scrollPaneParams = new ScrollPane(0);
    panelParams = new Panel();
    nbParameters = paramsName.size();
    int i = WinHeight - (33 + 7 * Yspc + logoHeight + imageHeight + 23);
    if (i < Yspc + 2 + 24)
    i = Yspc + 2 + 24;
    scrollPaneParams.setBounds(0, 0, WinWidth - 10, i);
    panelParams.setLayout(new GridLayout(nbParameters, 1, 5, Yspc / 2));
    scrollPaneParams.add(panelParams);
    panelParams.setBackground(sepColor);
    panelParameters = new Panel[nbParameters];
    labelParameters = new Label[nbParameters];
    textFieldParameters = new TextField[nbParameters];
    labelComments = new Label[nbParameters];
    for (int j = 0; j < nbParameters; j++)
    panelParameters[j] = new Panel();
    panelParameters[j].setLayout(new FlowLayout(0, 5, 1));
    panelParams.add(panelParameters[j]);
    panelParameters[j].setBackground(parColor);
    labelParameters[j] = new Label();
    labelParameters[j].setText((String)paramsName.elementAt(j));
    panelParameters[j].add(labelParameters[j]);
    labelParameters[j].setForeground(fgColor);
    labelParameters[j].setFont(new Font("Dialog", 1, 12));
    textFieldParameters[j] = new TextField(8);
    textFieldParameters[j].setText(paramsValue.elementAt(j).toString());
    panelParameters[j].add(textFieldParameters[j]);
    textFieldParameters[j].setBackground(fgColor);
    textFieldParameters[j].addKeyListener(this);
    labelComments[j] = new Label();
    labelComments[j].setText((String)paramsComment.elementAt(j));
    panelParameters[j].add(labelComments[j]);
    labelComments[j].setForeground(fgColor);
    add(scrollPaneParams);
    panelHelp = new Panel();
    labelHelp = new Label();
    panelHelp.setLayout(new FlowLayout(1, 5, 0));
    add(panelHelp);
    panelHelp.setBackground(bgColor);
    labelHelp.setText(" Change colour values and press enter ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    labelHelp.setForeground(helpColor);
    return null;
    private String readParams(String string1)
    Object object1;
    String string2;
    if (string1 == null)
    return "Filename of filter's parameters needed";
    try
    URL uRL = new URL(getDocumentBase(), string1);
    URLConnection uRLConnection = uRL.openConnection();
    uRLConnection.setDoInput(true);
    uRLConnection.setUseCaches(false);
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(uRLConnection.getInputStream()));
    string2 = null;
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    if (bufferedReader != null)
    Object object2;
    try
    for (object2 = bufferedReader.readLine(); object2 != null && string2 == null; object2 = bufferedReader.readLine())
    string2 = extractFormat(object2);
    catch ()
    string2 = object2.getMessage();
    finally
    bufferedReader.close();
    if (string2 != null)
    return string2;
    else
    return null;
    private String extractFormat(String string1)
    if (string1.length() == 0)
    return null;
    int i = 0;
    int j = string1.indexOf(" ", i);
    if (j == -1)
    return "Bad format error (space missing)";
    String string2 = string1.substring(i, j);
    if (string2.equals("TITLE"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    title = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    originalCaption = string1.substring(i, j);
    return null;
    if (string2.equals("FILTEREDCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    filteredCaption = string1.substring(i, j);
    return null;
    if (string2.equals("LOGO"))
    i = j + 1;
    j = string1.length();
    logoFileName = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALIMAGE"))
    i = j + 1;
    j = string1.length();
    originalImageFileName = string1.substring(i, j);
    return null;
    if (!string2.equals("PARAM"))
    return null;
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    paramsName.addElement(string1.substring(i, j));
    i = j + 2;
    j = string1.indexOf(32, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    try
    paramsValue.addElement(new Double(string1.substring(i, j)));
    j = string1.indexOf(34, i);
    catch (NumberFormatException e)
    return "Bad format in a PARAM line";
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    paramsComment.addElement(string1.substring(i, j));
    return null;
    public EasyFilter()
    logoHeight = 33;
    Yspc = 5;

    Addition to my above submission
    To clarify, I'll offer the US$20 to the FIRST person who offers me a workable solution to the problem, not to everyone!!!
    JMGRAHAM

  • Communication between different JVMs

    Hallo,
    is there a simple way, to exchange data between different java sessions? At the moment I store the needed data to a table and load it in my java procedures when ever I need them.
    But because this data is temporary, it wouldn't really be necessary to store the data. It's just for communication between the different JVMs. Is there an other way to do this, too?
    Thanks, Christian

    Christian, I may have misunderstood your question, but, until java version 1.4, the only way for different JVMs to communicate was via sockets, or secondary storage (the file system -- which includes databases).
    In java version 5.0 (previously version 1.5), there is a new feature known as class data sharing.
    But since you posted to the "Database >> JVM" forum, I can't help thinking that you are referring to different database JVMs. Is that correct? In any case, sockets and secondary storage are your only options there as well.
    Good Luck,
    Avi.

  • Communication between JInternalFrame

    Hi, I have a question on the communication between two separate JInternalFrames in the same GUI.
    for example, Jinternalframe1 has a Jbutton (where action Command is already set and is ready to be caught in the actionPerformed() method). When I press the Jbutton in internalframe1, how can I create an Event in Jinternalframe2?
    Thanks in advance.

    if you want to set the background for a button on the an internal frame from the other for example, you can do this :
    public class MyFirstInternalFrame extends JInternalFrame
    public JButton b1 = new JButton(...);
    public MyFirstInternalFrame ()
    b1.addActionListener( new Action.... Performed{
    MySecondInternalFrame.b2.setBackground(Color.blue);}
    public class MySecondInternalFrame extends JInternalFrame
    public static JButton b2= new JButton(...);//must be public & static
    public MySecondInternalFrame ()
    I hope it will help you..

  • Communication between Two WebLogic instances on the same machine

    Hi,
    We're having a problem with communication between two copies of Weblogic on
    the same machine. They are configured with seperate ports (regular and SSL).
    Independantly, they run fine. I can access EJBs running on either of them.
    The problem is that a bean in one of them has code which attempts to access
    an EJB on the other one. The procude fails when trying to obtain the initial
    context. This same code works if compilied independantly of WebLogic on the
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

    Thanks for the prompt reply.
    There is one IP address (internal address 10.227.1.34) one the machine. WLS1
    is set up at ports 7001 and 5133. WLS2 is setup at ports 7004 and 7005.
    When WLS1 attempts to obtain a context to WLS2 with the URL
    t3://10.227.1.34:7004/ it pauses for a long period of time. Running truss
    on the both WLS processes shows communication occuring between the two
    followed by long periods of silence. Finally WLS2 spits out the error
    ConnectionException[7001,7001,5133,5133,7001,7001] (paraphrased, I can get
    the entire error if it would help).
    After another long pause, WLS1 quits trying with the error 'Server
    10.227.1.34:7004 not found' (again paraphrased).
    Among the things we've tried:
    * Changing the URL from the IP to 127.0.0.1
    * Enabling/disabling SSL on either or both WLSs.
    * Changing the server name in WLS2's copy of weblogic.properties from
    'myserver' to 'myserver2' (previously they were both 'myserver')
    * Upgrading WLS2 to 5.1.0sp5 (Tried upgrading WLS1, but was getting class
    not found errors and quit because that WLS is being used by other people)
    This is a Solaris server. WLS1 is running 5.1.0 and WLS2 is running 5.1.0sp5
    Any suggestions would be appreciated.
    Best,
    Randy Yarger
    marchFIRST
    [email protected]
    "Michael Girdley" <[email protected]> wrote in message
    news:[email protected]...
    >
    >
    There should not be. What is your network configuration? Are they on
    separate IP addresses?
    Thanks,
    Michael
    Michael Girdley
    BEA Systems Inc
    "Randy Jay Yarger" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    We're having a problem with communication between two copies of Weblogicon
    the same machine. They are configured with seperate ports (regular andSSL).
    Independantly, they run fine. I can access EJBs running on either of
    them.
    The problem is that a bean in one of them has code which attempts toaccess
    an EJB on the other one. The procude fails when trying to obtain theinitial
    context. This same code works if compilied independantly of WebLogic onthe
    same machine.
    Are there any known issues regards communication between two running
    instances of Weblogic on the same machine?
    Thanks in advance,
    Randy Yarger
    marchFIRST
    [email protected]

  • Communication between javascript and Objective-c in iOS.

    We wanted to have a communication between javascript and objective c code. We have already tried the below approach.
    To load fake URLs in JS and append a string which will be used as parameter to the Objective-C code and parse that URL in this delegate method:
    -(BOOL)webView(UIWebView *)webView shouldStartLoadWithRequest(NSURLRequest *)request navigationType(UIWebViewNavigationType)navigationType
    Then send the return value by calling the native method stringByEvaluatingJavaScriptFromString again with parameter callID.
    But we wanted to access Objective class object in Javascript code so that we can call it's methods from javascript code using this object.Android supports this behaviour using addJavaScriptInterface method in webview. Is it possible to have the similar approach in IOS? If not what is the best approach possible to acheive this? If we could achieve similar behaviour then we don't need to change the Jacascript code and will be reused. Please suggest the best possible solution.
    Regards,
    Karthik M.

    https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptu al/SafariJSProgTopics/Tasks/ObjCFromJavaScript.html

  • Error 2032 in communication between Flex Client and WCF

    Hi All,
    I'm trying to establish communication between Flex Client
    and WCF service.
    WCF service accepts gZip compressed data and returns gZip
    compressed results.
    So I used Flex ByteArray.compress() and
    ByteArray.uncompress() for this purpose. However, it throws error
    2032.
    The gZip compression/decompression uses MemoryStream class in
    C#. Based on my previous experience, memory stream communication
    between Flex and C# gives erro 2032.
    Is there a work around for this?
    Thanks,
    Vishal

    I read some thread in the forum, and found somebody had the similar problem with me. Just want to know how to settle this problem.
    In the client/server program. Client is a JAVA program and Server a
    VC++ program. The connection works, and the problem appears after some time. The Client sends a lots of requests to Serverm, the server seems receive nothing. But at the same time, the server is able to send messages to Client. The Client also can get the messages and handle them. Don't understand why there this problem and why it appears when it wants.
    The client is a Win2k platorm with JDK1.3.1 and the server is also a Win2K platform with VC++ 6.0.
    In the Client, using:
    inputFromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    outputToServer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);
    Hope can get your help.

  • Communication between separate ADF Web Applications

    Using 11.1.1.5 of JDeveloper I have two Fusion Web Applications that each have a single "view" task flow. Those task flows will be dropped into regions within a WebCenter Portal application so they behave like portlets. I'd like to have a value from one app passed to the other app and have the second app respond to the change. It seems like it should take about 10 minutes but so far... two weeks without any progress. I'm incredibly frustrated. Does anyone have a simple list of the steps I need to perform to pass parameters between task flows? Please help! All I'm looking for is step 1: set up this, step 2: set up that. I can't believe it's this hard.
    All of the samples I find on line are about inter portlet communication with JSR 286 portlets, WSRP portlet producers or inter-component communication. I've read this too: http://www.oracle.com/technetwork/issue-archive/2011/11-may/o31adf-352561.html but I haven't been working with JDev and WebCenter for 5 years so it simply doesn't make sense. For example, one piece of sample code looks like this
    public void handleEventStringPayload(String customPayLoad) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory exprFactory =
    fctx.getApplication().getExpressionFactory();
    ValueExpression ve =
    exprFactory.createValueExpression(elctx, "#{backingBeanScope.mirrorPageBean}",
    Object.class);
    MirrorPageBean mirrorPageBean = (MirrorPageBean)ve.getValue(elctx);
    mirrorPageBean.setMirrorValue(customPayLoad);
    AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
    adfFacesContext.getCurrentInstance().addPartialTarget(mirrorPageBean.getMirrorTextField());
    Pretend I don't know the nine layers of technology involved here. Why in the world do I need all of this stuff in this order just to set a parameter... or is that NOT what this is doing? Why are they doing addPartialTarget? What does that do? Why do they have an EventObjectHandler and an EventStringHandler? The article is clearly written for an experienced WebCenter developer and that simply isn't me. If anyone has a resource that shows me how to pass parameters between web apps that actually explains the steps needed and why they need to be taken, that would be great.
    Thanks in advance for any help.

    Hi!.
    To communicate two regions (ADF Task Flows) in a WebCenter Portal Page you have "Contextual Events Framework".
    You can learn it following this Blog entries:
    http://technology.amis.nl/blog/3365/adf-11g-how-events-in-one-region-cause-other-regions-to-refresh
    http://andrejusb.blogspot.com/2010/10/contextual-events-framework-and-adf-11g.html
    http://www.oracle.com/technetwork/issue-archive/2011/11-may/o31adf-352561.html
    Video: http://www.youtube.com/watch?v=XIVom59Kq2U
    In addition, you can communicate two regions without Contextual Events following this entry:
    http://andrejusb.blogspot.com/2010/04/communicating-between-adf-regions.html
    Regards!
    Edited by: Daniel Merchán on 22-feb-2012 22:15
    Edited by: Daniel Merchán on 22-feb-2012 22:18

  • Maximizing communication between objects.

    Hi,
    I have a question concerning communication between objects. Particularly I want to learn to maximize communication between objects. Obviously there are several ways of increasing communication between objects, unfortunately I only really understand one methodology, which is as follows:
    For example:
    If I were to create an object called GUI of class UserInterFace, like so
    class UserInterface extends JFrame
      private variable1;
      private variable2;
      UserInterface()
        setBounds(x,y,width,height);
        setVisible(true);
    }I could then create an object called fileOps of class FileOperations and pass the entire GUI object into the constructor of the fileOps class, as follows:
    class FileOperations
      private FileReader input;
      private FileWriter output;
      private UserInterface GUI;
      FileOperations(UserInterface GUI)  //GUI object introduced.
        this.GUI = GUI;
    }By following the code fragments above it becomes obvious that I can establish communications between the fileOps object and the GUI object. With code similar to the above; fileOps will be able to access all of the accessor and mutator methods within object GUI. Using the above methodology always requires making all variables private and accompanying those variables with public methods (thus preserving encapsulation).
    If anybody can suggest any other methodologies for increasing communication between objects they will be greatly appreicated. Of interest to me is how one can go about ensuring complete two way communication between objects, my example above is rather one sided (fileOps can see GUI, but not vice versa). Obviously the instantiation of objects must occur in some procedural sequence, I want to know how to capitilize on this. Suggestions to read a particular book will be appreciated, however suggestions born from peoples experiences are most desired. Thanks.
    Regards
    David

    Rommie and Rajesh,
    Thank you both kindly for sharing your time and valuable knowledge. As I have only been programming with Java for a year part time (as one section of a Computer Systems Diploma) I consider myself to be a beginner in programming terms. I want to do really well with Java as quickly as possible and you have both helped me tremendously.
    Rommie the methodology that you have passed onto me is great, thankyou so much, I feel like a new section of Java has completely opened to me. I will be using the third "reference" class methodology from everyday now on.
    Rajesh your words are encouraging, and I will be reading up on Hierarchy and Aggregation immediately. When you said "Before using either, decide on the existence of the object, its intended functionalities e.t.c. ...", could you please explain with an example as to where Hierarchy is desirable and where Aggregation is desirable.
    Please feel free to e-mail me with further suggestions if you come up with something else that aids in the communication between objects.
    E-mail: [email protected]
    Thanks again.
    Regards
    David

  • Design question: Communication between objects

    Hi all,
    Just interested in some opinions from your experience. If you have two components, say two GUI components which are repesented by two separate classes, and you need to have these classes communicate in a relatively small way, how would you do it?
    What I've done is passed a reference of the second object to the first.
    I guess I'm wondering whether this would be considered a reasonable design, or should there be some in-between class which manages the communication between objects.
    For a more concrete example: I have a main class (with my main() )which is a JFrame, and this frame has a split panel. I want the left and right sides to communicate with each other. Should I handle the communication through my main class, or should I "couple" the two classes upon initialization and let them do their communication independent of the my main class?
    Thanks for any opinions or comments.

    >
    When the user selects a node on the JTree, I want to
    populate a particular ComboBox on the right based on
    what the user selected in the tree. Or I may just
    re-initialize the entire right component based on the
    selected node on the JTree.
    I guess I was wondering whether I should "marry" the
    JTree and the JPanel class, and let them do their
    communicating when needed, or whether I should manage
    the communucations through the JFrame class.
    For example, say I use the JFrame as a "message
    manager". The JFrame class will listen for events
    from the JTree on the left side, and then send the
    appropriate information to the right side. This way
    the JTree class and the JPanel class would have no
    knowledge of each other. They are glued together
    through my JFrame.
    Thanks for your opinions.
    Then you must register a selection listener with the JTree with addTreeSelectionListener this listener has a reference to the combo. The listener can be a new class (inner class or anonymous) used only for this purpose.
    Bye.

  • Internal error in communication between configuration and sales document

    Hi,
    While i am doing VA32 i got this message  plz advise me..
    Internal error in communication between configuration and sales document
    in the form GET_CONFIG_MODE
    bit urgent  issue..
    Regards,
    San Rao.

    Hi
    Pls check the OSS note 836097, which can solve your problem.
    In my experience, I can tell you something
    When configuration is done, the configuration object is stored in VBAP-CUOBJ for the item. For this CUOBJ, you can find the configuration in the tcode CUTABLEINFO or in tables IBIB, IBIN, IBEXTINST, IBINOBS,IBINOWN,IBST,IBSTREF,IBINVALUES.
    If for the order if VBAP-CUOBJ is not available, then it will not be able to get the configuration. The error message in this case is V1 854 of message class V1.
    You can search for some other OSS notes also using this error message and the form name.
    Also refer to 173726, 174333,175372 and 173664

  • Communication Between Classloaders

    Hi.
    I would like to know if is possible the communication between two different classloader using only one class (like Singleton), for example:
    The first classloader A loads a class X and set the value of a static variable to �Ok�.
    The second classloader B loads a class X and get the value of a static variable and return �Ok�.
    But when I get the value the return is �Not ok�.
    Thanks for your help.
    Edited by: Orlewilson_Maia on May 21, 2008 6:29 PM

    Orlewilson_Maia wrote:
    If I put a class A in the extensions loader, like CLASSPATH\lib\ext, how can I create a classloader to delegate a solicitation of information, like getStatus from the class A?Sounds like a bad idea to me all around.
    First, if you want to explicitly load classes then do not put them anywhere that the VM can find them. At a minimum it makes it harder to code and debug because mistakes that allow the system loader to load it can creep in.
    Second class loaders load classes. They don't call methods.

Maybe you are looking for

  • ICloud Control Panel does not recognize Outlook

    I installed the iCloud Control Panel but it doesn't seem to be recognizing Outlook.  In the Control Panel header, it says "Install Outlook to use Mail, Contacts and Calendars.  Outlook 2010 is installed and the iCloud Outlook Add-In is installed and

  • Wont install some 64bit programs

    why do I keep having this problem - I just bought this and again it wont work!

  • User Count.

    Hi All. First of all, I'm sorry for my English. But, I'll do my best to explain. I'm developing Text Chat App with FMS 4, Flex 4.6. I want to count how many users in. I've searched enough. And I made some codes. Server Side Code(main.asc) application

  • SAP GRC Access Control 5.3 intergration with orcale

    Good Day GRC Gurus, We want to integrate SAP GRC Access Control 5.3 with ORACLE. It would be great if someone could share some documents, presentation and experience on the same. Thanks in advance!!!!!!!!!!!!! Thanks and Regards, Jagat

  • Calling web service -authentication using passwordtext

    Hi, My requirement is to call a web service . WS which I consume need password type as Passwordtext. I did following step 1.From SE80 created Enterprise Services using WSDL file. 2.In SOAMANAGER select my consumer proxy. 3.Created Logical port ZXYZ b