MapListener & MapEvent Network Details

Hello
What are the network details concerning MapListeners within a Coherence cluster?
MapListeners aren't required to be serializable, so this indicates that MapListeners are maintained on the heap of the JVM that has registered the MapListener. I'm concerned with purely client-side MapListeners here, not backing map listeners or Extend listeners.
What is flying around the cluster when I do a put(.., ..) on a distributed (partitioned, replicated, etc.) cache? The put() call can occur from any node in the cluster, even one that does not have a MapListener registered locally. Is the Cluster constantly generating and sending (possibly broadcasting) MapEvents in response to puts() and removes(), even in the case where there are no client-side MapListeners on any node in the cluster? Does the cluster infrastructure blindly send (possibly broadcast) a MapEvent (or some internal representation) to all cluster nodes?
I ask out of interest in deepening my understanding of Coherence. The documentation is quite clear in terms of the API, but it makes no mention of what is happening under the covers, and I would like to know.
Regards, Pete

Hi Pete,
What is flying around the cluster when I do a put(.., ..) on a distributed (partitioned, replicated, etc.) cache? The put() call can occur from any node in the cluster, even one that does not have a MapListener registered locally. Is the Cluster constantly generating and sending (possibly broadcasting) MapEvents in response to puts() and removes(), even in the case where there are no client-side MapListeners on any node in the cluster? Does the cluster infrastructure blindly send (possibly broadcast) a MapEvent (or some internal representation) to all cluster nodes?The behaviour is that, if there is no client-side MapListener registered, no event will be sent. And when there is a client-side MapListener registered, the event/message is sent basically on UDP only to the nodes registered with MapListener.
Hope this clear your queries.
Regards,
Rock
Edited by: Rock Ching on Jan 20, 2011 12:57 AM

Similar Messages

  • How to get the network details in flex4.5 web application

    How to get the network details in flex 4.5 web application
    similar to the nativeinterface in air application

    checkout this document for secure web application
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf6167e-7fff.html    

  • RAC network details

    Hi all
    i am planning to seup RAC oracle 10.2 using AIX O/S
    Can anyone provide me Network Details to setup two node RAC
    I will be using ASM and raw devices for OCR and Voting Disk and not GPFS and Hacmp.
    Please guide
    Thanks

    Hi,
    Please see bellow about what you need for this installation.
    http://download.oracle.com/docs/cd/B19306_01/install.102/b14201/toc.htm
    you need 2 NICs on each RAC node, one for public and virtual IP address configuration and other for private network between/among nodes.
    Assign public IP which belongs to your public network and a different IP sachem's IP which should be private for the nodes and should not be pingable from outside the nodes.
    Salman

  • TS1398 i have entered my wi-fi network details in my iPod touch but and it recognises it but it won't connect to it

    I have entered my network details in my iPod touch and it recognises it but it doesn't connect to it.

    Tap Settings > General > Reset > Reset Network Settings
    You will have to re enter your Wi-Fi password.
    If that did not help, try the help provided in the link you posted from >  iOS: Troubleshooting Wi-Fi networks and connections

  • Capture network details

    hi,
    i am using OAS 9.0.4 and java for my project.
    i want to capture details to know speed of application pages,the frequency wehn user i able to quickly view/takes time to view page..
    This required as many users will be connecting from remote areas and they complain about application access being slow.
    to debug such network issues what could be the best way??
    are there any API's to capture which user has logged in, what is the login time,network details:ipadress of the user's machine:any other specific info for network etc.
    asktom.oracle.com site has such features how can i go about it??
    regards,
    Avinash

    Here's a start. I use it to get the network userid for the user running forms.
    first, create a function:
    CREATE OR REPLACE FUNCTION "your_schema_name"."OS_USER" return
    varchar2 is begin
    Return sys_context('USERENV','os_user');
    End;
    Then, in your trigger code or wherever,
    Declare
    network_userid varchar2(30);
    begin
    select os_user into network_userid from dual;
    end
    Consult the Oracle data dictionary views. There's probably something in there that will get you most of what you're after.
    HTH,
    Ron

  • IPod Wi-Fi broken, will no longer connect, network details all blank

    Hello,
    My iPod has been working fine with Wi-Fi for ages. But today I got home and it's no longer working. At all. To any network.
    I clicked on the blue arrow next to my home network and IP Address, Subnet Mask, Router, DNS, Search Domains and Client ID are all entirely blank. In fact, there's no information anywhere.
    When I try connecting to my network (which suddenly has one bar of health) I get an immediate "Unable to join the network".
    Can anybody help? Do I need to send it to Apple to get repaired?
    Thanks,
    Ben

    Hi Ben....
    There is something else to try!
    When you tap the blue arrow you get the screen in which you can tell it to forget networks. Do that then enter your home wifi network name again and password.
    If you get nothing I would suspect a faulty Touch !!
    Mike.

  • "There was an error joining the airport network" details included

    im running a linksys wireless router with mac filtering, no password. network works well, filters other people fine, allows me to connect...usually. both mac id's for the PB are in there, ethernet and airport. I can connect wirelessly sometimes and hold the connection for varying lengths of time. hardwired is always perfect. I've searched extensively for answers before bothering all you wonderful people and apparently its an issue related to the computer going to sleep. upon waking up it sees all the networks in range (townhomes, so there are about 6 networks at max) including mine. i try to connect and it gives me the "error joining network" message. I've tried turning airport on and off, restarting computer, and router. nothing seems to do the trick every time, it just randomly will work again. router reset works the best overall but ireally dont want to keep having to do that all the time. Is there any way to fix this issue? thanks in advance for all the help
    linksys router with mac filtering, dhcp
    all other things connect and stay connected just fine

    Silly question first ... do you have a 2.4 Ghz phone or does your neighbor have a teenager with one? Maybe try changing the channel on the linksys.
    I used to live with my sister whose phone would knock out my signal on a regular basis and that's the message I would get.

  • Remember Network details

    My HP B110a does not remember the network data. As soon as we cut off the power supply the network settings are gone. Is this normal?

    You can try to download a plugin from this webpage and then see if you can see any change in the speed.
    Webpage is
    http://mosh.nokia.com/content/3EA6C8F029E7DE8BE040​050AEE04678D
    It worked fine for my friend hope it work fine for you.
    Thanxs,
    Sam

  • MacOS losing details of network

    Ever since the last firmware upgrade was pushed to my Airport extreme (a few months ago), I have been experiencing a loss of memory on the part of MacOS regarding the network details each time there is a shutdown or even a "sleep". This is the case for 2 machines on the same wireless network, a MacMini and an iMac.
    following a "sleep", Safari cannot reach the network, and I have to go through the entire process of selecting a network to join, supplying a password (even though I always check "remember this password in the keychain").
    How can I fix this irritating situation?

    Hi
    base tables are PROJ and PRPS
    from this take WBS element number and
    The linking between the tables of network orders and the Purchase related tables are
    afko-pronr  = prps-psphi
    afvc-projn = prps-pspnr
    and
    aufk-pspel = prps-pspnr
    ebkn-nplnr = afko-aufnr for PR link
    ekkn-nplnr = afko-aufnr  for PO link
    mseg-nplnr = afko-aufnr  for GR/GI link
    Regards
    Anji

  • Is there a way to see and have control over who connects to your time capsule wifi network?

    Ok, have this question. Have a time capsule wifi network. Have the latest mountain lion on my mac pro. I know if you go into airport utility, and you click on the picture of my timecapsule it shows what clients are connected to my time capsule aka using my internet etc.
    What I want to know, is there somewhere I can go on the mac where I can view who is connected to my time capsule wifi in more detail, see amounts of data they are using, and maybe even boot them off, or ban there computer from the network for a while if need be? Trying to assess what family members are using up all our data, and want to ban the appropriate offenders
    Even if Mac doesnt have anythink, if you know any third parties from the app store that have an app that is like a "tap" on the top of your Mac that shows networking details, that would be great too!
    Thanks heaps!

    Nope.. TC are not burdened with controls.. don't you know..
    In fact you will find it hard to find a wireless router on the market that mets your specs.. but there is a great 3rd party firmware.. called gargoyle.. this can be loaded like an official firmware in a NETGEAR WNDR3800 which is a fairly cheap very good solid wireless router.. bridge your TC behind this router running gargoyle and you can set quota for all your family members (kids I imagine). Quota can be set for daily, weekly even hourly.. and you can apply throttles or qos.. none of these controls even exist in the TC.

  • HP Officejet Pro 8500A A910a can't automatica​lly connect to wireless network

        Product Name and Number
         HP Officejet Pro 8500A A910a
         Netgear DGN2200 Wireless Router
    Operating System
        Windows 7 32-bit
     I experience frequent power outs and whenever power is restored I have to reconnect the printer through WPS. I have followed all the instructsons here to connect automatically and I have added the wireless network details in the printers embedded server but still no luck. Anything else I can do?
    Alternatively I was thinking of connecting the printer to the router via ethernet. But how then do I get my wireless laptops to communicate with the printer to print and scan?

    HI,
    Not sure if this is fixable after an power outtage, but connecting the printer via ethernet to the router keeps printing and scanning over the network the same, as long as your wireless laptops are in the same network. After connecting the printer just reinstall the drivers on your laptop so that it gets the correct ip adres and everything should be fine.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Although I work for HP my posts and replies are my own
    Please mark the post that solves your problem as "Accepted Solution"

  • Windows 7 and Windows Xp Joint Network...

    Dear Members.......i want to ask 2 very common question i tried a lot to find a solution on internet, but couldn't so i am here.
    Our Network Details.
    we have a small company with 15 computers all of these computers, when we bought they had installed windows 7 ultimate. just old 2 computers has windows xp. office is divided in to two parts one network is connected through switch (No internet access) and
    the second network is connected through wireless router (all have internet access).
    Question 1. in our wifi network where all the computers has windows 7 ultimate we have problem of usb diagnostic for exampel if i insert a usb to one computer its reads it but if the same usb i insert in another computer it does not read
    it but that computer reads some another usb in this situation for me its very hard to find where is problem if all the computers does not recognize a usb i can imagine that problem is in usb but all the computers reads the usb with there own choice.... i have
    tried this(i opened the device mangaer and delete everything under the usb port....and restarted the computer. but it did not solved my problem.
    Question 2. in our second network which is connected through Ethernet cable, i saw in host file there is no mapping against any ip address, but when i ping a computer through its name or ip address both of them works. my question is here
    that i have not mapped the any computer name with there ip address in host file so how it works...?
    Thanks
    Tahir Mehmood

    Hi,
    For the first question, from your description, seems a computer issue rahter a usb issue, make sure that you haven't set any usb restriction group policies, some policies can block special usb devices as the admin wants, please refer to this link
    http://technet.microsoft.com/en-us/magazine/2007.06.grouppolicy.aspx
    If you haven't set any policies mentioned above, then there might be a driver issue, if so, have you tried to reinstall usb controller?
    http://blogs.technet.com/b/asiasupp/archive/2010/11/23/error-message-one-of-the-usb-device-attached-to-this-computer-has-malfunctioned-and-windows-does-not-recognise-it.aspx
    Regarding to the Ping, please see explanation about "how it works" in the following technet link
    http://technet.microsoft.com/en-us/library/cc940091.aspx
    Yolanda Zhu
    TechNet Community Support

  • Networking - Why Doesn't This Work?

    Hey all
    Just wondering if any of you have any ideas why this code isn't working properly - for the Client to connect the Server has to be restarted. Is there a solution to this problem?
    The Client Class:
    import java.awt.Container;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.FlowLayout;
    import java.awt.Dimension;
    import java.awt.GridBagLayout;
    import java.awt.GridBagConstraints;
    import java.awt.Insets;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JColorChooser;
    import javax.swing.ButtonGroup;
    import javax.swing.Box;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.BoxLayout;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.JLabel;
    import javax.swing.JComboBox;
    import javax.swing.JOptionPane;
    import javax.swing.JRadioButton;
    import java.io.*;
    import java.net.*;
    * This is the user class and holds all the details for the GUI. The gui contains listeners
    * ans it sends messages to the server and also recieves messages from the server. This class
    * works primarily with the ClienttoServer class.
    * Help was used to create this class, mainly from the Java GUI devlopment book by Varan Piroumian
    * as this hsowed the basic components needed to create a GUI and which imports were the most essential
    * in order to have an interactive interface for the chat application.
    public class Client extends JFrame implements ActionListener
         private static final long serialVersionUID = 1L;
         private JTextArea conversationDisplay;
         private JTextField createMsg, hostfield, portnumfd, usernamey;
         private JScrollPane scrolly;
         private JLabel hosty, portnum, convoLabel, msgLabel, netwrk, netwrk2, talk2urself, fonts, nickName, ustatus, econs;
         private JPanel lpanel, rpanel, lpanel1, lpanel2, lpanel3, lpanel4, lpanel5, rpanel1, rpanel2, rpanel3, rpanel4, rpanel5;
         private JButton sendMsgButton, colourButton, exitButton, connect, dropconnection;
         private JRadioButton talk2urselfOn, talk2urselfOff;
         private JComboBox fontcombiBox, statusbox, emoticons;
         private JColorChooser colourchoo;
         private Container theWholeApp;
         private String username;
         private PrintWriter writer;
         private Socket socky;
         //for the self comm button
         private boolean talktoself = true;
         //used as when a msg is sent to the server the name & msg are sent in 2 parts (\n function) i.e
         //2 different messages. So in self comm mode then the next message needs to be ignored
         private boolean ignoreyourself = false;
          * The Constructor or the class
         public Client()
              makeGUI();
              System.out.println("Loading the GUI....");
          * Creates the GUI for the user to see/use
         public void makeGUI()
              //create the whole window
              JFrame.setDefaultLookAndFeelDecorated(true);
              //set the title of the whole app
              this.setTitle("Welcome To Elliot's Chat Network...");
              //set the app window size
              this.setSize(600, 575);
              //create the outer container for the app
              theWholeApp = getContentPane();
              //make new gridbag layout
              GridBagLayout layoutgridbag = new GridBagLayout();
              //create some restraints for this...
              GridBagConstraints gbconstraints = new GridBagConstraints();
              //make the app use this gridbag layout
              theWholeApp.setLayout(layoutgridbag);
              //this is where elements are added into the application's window
              //creates and adds the convo label
              convoLabel = new JLabel("Your Conversation:");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 0;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 5;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.WEST;
              layoutgridbag.setConstraints(convoLabel, gbconstraints);
              theWholeApp.add(convoLabel);
              //create & add the exit button
              exitButton = new JButton("Exit");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 10;
              gbconstraints.gridy = 0;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 1;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.EAST;
              layoutgridbag.setConstraints(exitButton, gbconstraints);
              theWholeApp.add(exitButton);
              exitButton.addActionListener(this);
              //create & add the txt area
              conversationDisplay = new JTextArea(15,15);
              scrolly = new JScrollPane(conversationDisplay);
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 1;
              gbconstraints.gridheight = 4;
              gbconstraints.gridwidth = 11;
              gbconstraints.weightx = 10;
              gbconstraints.weighty = 20;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.BOTH;
              gbconstraints.insets = new Insets(10, 10, 15, 15);
              //so the clients cant write in the display area...
              conversationDisplay.setEditable(false);
              layoutgridbag.setConstraints(scrolly, gbconstraints);
              theWholeApp.add(scrolly);
              //create & add the nick name area
              nickName = new JLabel("Your nick \nthis is required");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 5;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 5;
              gbconstraints.weighty = 1.5;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.HORIZONTAL;
              gbconstraints.insets = new Insets(3, 10, 0, 0);
              layoutgridbag.setConstraints(nickName, gbconstraints);
              theWholeApp.add(nickName);
              //create & add the nick name box
              usernamey = new JTextField(10);
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 6;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 1;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.HORIZONTAL;
              gbconstraints.insets = new Insets(0, 10, 0, 0);
              layoutgridbag.setConstraints(usernamey, gbconstraints);
              theWholeApp.add(usernamey);
              //create & add the your message label
              msgLabel = new JLabel("Your Message:");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 7;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 1;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.BOTH;
              gbconstraints.insets = new Insets(0, 10, 0, 0);
              layoutgridbag.setConstraints(msgLabel, gbconstraints);
              theWholeApp.add(msgLabel);
              //create & add the create message box
              createMsg = new JTextField(15);
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 8;
              gbconstraints.gridheight = 2;
              gbconstraints.gridwidth = 10;
              gbconstraints.weightx = 10;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.fill = GridBagConstraints.HORIZONTAL;
              gbconstraints.insets = new Insets(3, 10, 0, 0);
              layoutgridbag.setConstraints(createMsg, gbconstraints);
              theWholeApp.add(createMsg);
              createMsg.addActionListener(this);
              createMsg.setActionCommand("Press Enter!");
              //create & add the send message button
              sendMsgButton = new JButton("Send Msg");
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 10;
              gbconstraints.gridy = 8;
              gbconstraints.gridheight = 1;
              gbconstraints.gridwidth = 1;
              gbconstraints.weightx = 1;
              gbconstraints.weighty = 1;
              gbconstraints.anchor = GridBagConstraints.EAST;
              layoutgridbag.setConstraints(sendMsgButton, gbconstraints);
              theWholeApp.add(sendMsgButton);
              sendMsgButton.addActionListener(this);
              //create & add the left panel
              lpanel = new JPanel();
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 0;
              gbconstraints.gridy = 10;
              gbconstraints.gridheight = 3;
              gbconstraints.gridwidth = 4;
              gbconstraints.weightx = 5;
              gbconstraints.weighty = 0;
              gbconstraints.anchor = GridBagConstraints.WEST;
              gbconstraints.insets = new Insets(0, 10, 0, 0);
              layoutgridbag.setConstraints(lpanel, gbconstraints);
              theWholeApp.add(lpanel);
              //create & add the right panel
              rpanel = new JPanel();
              gbconstraints = new GridBagConstraints();
              gbconstraints.gridx = 5;
              gbconstraints.gridy = 10;
              gbconstraints.gridheight = 3;
              gbconstraints.gridwidth = 4;
              gbconstraints.weightx = 5;
              gbconstraints.weighty = 0;
              gbconstraints.anchor = GridBagConstraints.EAST;
              layoutgridbag.setConstraints(rpanel, gbconstraints);
              theWholeApp.add(rpanel);
              //add to the left JPanel - set the layout for this
              lpanel.setLayout(new BoxLayout(lpanel, BoxLayout.Y_AXIS));
              //add panels into this left panel...
              lpanel1 = new JPanel();
              lpanel2 = new JPanel();
              lpanel3 = new JPanel();
              lpanel4 = new JPanel();
              lpanel5 = new JPanel();
              lpanel.add(lpanel1);
              lpanel.add(lpanel2);
              lpanel.add(lpanel3);
              lpanel.add(lpanel4);
              lpanel.add(lpanel5);
              //set FlowLyout for each of these panels
              lpanel1.setLayout(new FlowLayout(FlowLayout.LEFT));
              lpanel2.setLayout(new FlowLayout(FlowLayout.LEFT));
              lpanel3.setLayout(new FlowLayout(FlowLayout.LEFT));
              lpanel4.setLayout(new FlowLayout(FlowLayout.LEFT));
              lpanel5.setLayout(new FlowLayout(FlowLayout.LEFT));
              //add in the network items...
              netwrk = new JLabel("Network Details:");
              lpanel1.add(netwrk);
              //create and add instructions for this
              netwrk2 = new JLabel("Please enter the details for \nthe person you want to chat to...");
              lpanel2.add(netwrk2);
              //create/add the ip addy label
              hosty = new JLabel("Host:");
              lpanel3.add(hosty);
              lpanel3.add(Box.createRigidArea(new Dimension(5,0)));
              hostfield = new JTextField("Enter Hostname",10);
              lpanel3.add(hostfield);
              //port num next
              portnum = new JLabel("Port Number:");
              lpanel4.add(portnum);
              lpanel4.add(Box.createRigidArea(new Dimension(5, 0)));
              portnumfd = new JTextField("2250", 10);
              lpanel4.add(portnumfd);
              //create & add the connect butt
              connect = new JButton("Connect");
              lpanel5.add(connect);
              dropconnection = new JButton("Disconnect");
              lpanel5.add(dropconnection);
              connect.addActionListener(this);
              dropconnection.addActionListener(this);
              //start the creation of the right hand panel.
              rpanel.setLayout(new BoxLayout(rpanel, BoxLayout.Y_AXIS));
              //create the panels again
              rpanel1 = new JPanel();
              rpanel2 = new JPanel();
              rpanel3 = new JPanel();
              rpanel4 = new JPanel();
              rpanel5 = new JPanel();
              rpanel.add(rpanel1);
              rpanel.add(rpanel2);
              rpanel.add(rpanel3);
              rpanel.add(rpanel4);
              rpanel.add(rpanel5);
              rpanel1.setLayout(new FlowLayout(FlowLayout.LEFT));
              rpanel2.setLayout(new FlowLayout(FlowLayout.LEFT));
              rpanel3.setLayout(new FlowLayout(FlowLayout.LEFT));
              rpanel4.setLayout(new FlowLayout(FlowLayout.LEFT));
              rpanel5.setLayout(new FlowLayout(FlowLayout.LEFT));
         //now start putting things into them again
              //add in the font settings
              String[] fonty = {"Normal", "Bold", "Italic"};
              fonts = new JLabel("Set your text style:");
              fontcombiBox = new JComboBox(fonty);
              rpanel2.add(fonts);
              rpanel2.add(Box.createRigidArea(new Dimension(4,0)));
              rpanel2.add(fontcombiBox);
              //default text will be plain..
              fontcombiBox.setSelectedIndex(0);
              String[] userstatus = {"Online", "Away", "Be Right Back", "Busy", "Out To Lunch", "On The Phone"};
              ustatus = new JLabel("Select a status:");
              statusbox = new JComboBox(userstatus);
              rpanel2.add(ustatus);
              rpanel2.add(Box.createRigidArea(new Dimension(2,0)));
              rpanel2.add(statusbox);
              //add in some emotion to the conversations
              String[] emotion = {"Angry", "Happy", "Sad", "Crying", "Shocked", "Laughing", "Laughing My Ass Off!"};
              econs = new JLabel("Select an emoticon:");
              emoticons = new JComboBox(emotion);
              rpanel3.add(econs);
              rpanel3.add(Box.createRigidArea(new Dimension(3,0)));
              rpanel3.add(emoticons);
              //self comm options
              talk2urself = new JLabel("Set Self Communication Mode:");
              rpanel4.add(talk2urself);
              talk2urselfOn = new JRadioButton("On", true);
              rpanel4.add(talk2urselfOn);
              rpanel4.add(Box.createRigidArea(new Dimension(4, 0)));
              talk2urselfOff = new JRadioButton("Off", false);
              rpanel4.add(talk2urselfOff);
              //create a group that will hold both these buttons together
              ButtonGroup groupy = new ButtonGroup();
              //add them to the group
              groupy.add(talk2urselfOn);
              groupy.add(talk2urselfOff);
              //create and add the change backgrd button
              colourButton = new JButton("Alter Background");
              rpanel5.add(colourButton);
              //add in some listeners
              talk2urselfOn.addActionListener(this);
              talk2urselfOff.addActionListener(this);
              fontcombiBox.addActionListener(this);
              colourButton.addActionListener(this);
              statusbox.addActionListener(this);
              //add in the 'X' button in the top right corner of app
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              //put all elements together
              this.pack();
              //show the GUI for the user..
              this.show();
          * Creates a new client and GUI as its the main method
         public static void main(String args[])
              new Client();
          * This method listens for actions selected by the user and then performs the
          * necessary tasks in order for the correct events to take place...!
          * This method was mainly created thanks to the Developing Java GUI book which has already
          * been mentioned as it covers listeners and event handling...
         public void actionPerformed(ActionEvent event)
              //if the send button is clicked or if hard carriage return after message
              if((event.getSource() == (sendMsgButton)) || (event.getSource().equals(createMsg)))
                   //if theres no text dont send message
                   if(createMsg.getText().equals(""))
                        JOptionPane.showMessageDialog(this, "There's no text to send!");
                   else
                        String str  = createMsg.getText();
                        printMessage(str);
              //if the exit button is clicked
              if(event.getSource() == (exitButton))
                   //quit the chat app
                   JOptionPane.showMessageDialog(this, "Thanks For Using Elliot's Chat Network! \nSee You Again Soon!");
                   System.exit(0);
              //if the self comm option is turned on
              if(event.getSource() == (talk2urselfOn))
                   talktoself = true;
                   JOptionPane.showMessageDialog(this, "You have begun self communication \nmessages you send are now displayed");
              //if the self comm option is turned off
              if(event.getSource() == (talk2urselfOff))
                   talktoself = false;
                   JOptionPane.showMessageDialog(this, "You have stopped self communication \nmessages you send are no longer displayed");
              //for the normal font option
              if(fontcombiBox.getSelectedItem().equals("Plain"))
                   //makes a new font style plain...
                   conversationDisplay.setFont(new Font("simple", Font.PLAIN, 12));
                   createMsg.setFont(new Font("simple", Font.PLAIN, 12));
              //for the bold font option
              if(fontcombiBox.getSelectedItem().equals("Bold"))
                   conversationDisplay.setFont(new Font("simple", Font.BOLD, 12));
                   createMsg.setFont(new Font("simple", Font.BOLD, 12));
              //for the italic font option
              if(fontcombiBox.getSelectedItem().equals("Italic"))
                   conversationDisplay.setFont(new Font("simple", Font.ITALIC, 12));
                   createMsg.setFont(new Font("simple", Font.ITALIC, 12));
               *      //the status events if they didnt create null points...
              if(statusbox.getSelectedItem().equals("Online"))
                   String status = "<Online>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("Away"))
                   String status = "<Away>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("Be Right Back"))
                   String status = "<Be Right Back>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("Busy"))
                   String status = "<Busy>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("Out To Lunch"))
                   String status = "<Out To Lunch>";
                   printMessage(status);
              if(statusbox.getSelectedItem().equals("On The Phone"))
                   String status = "<On The Phone>";
                   printMessage(status);
              //the emoticons events...
              if(emoticons.getSelectedItem().equals("Angry"))
                   String status = "<Angry>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Sad"))
                   String status = "<Sad>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Shocked"))
                   String status = "<Shocked>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Happy"))
                   String status = "<Happy>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Crying"))
                   String status = "<Crying>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Laughing"))
                   String status = "<Laughing>";
                   printMessage(status);
              if(emoticons.getSelectedItem().equals("Laughing My Ass Off!"))
                   String status = "<Laughing My Ass Off!>";
                   printMessage(status);
              //if the colour button is clicked
              if(event.getSource() == colourButton)
                   //create a new colour chooser
                   colourchoo = new JColorChooser();
                   //create the dialog its shown in
                   JColorChooser.createDialog(colourButton, "Choose your background colour", true, colourchoo, this, this);
                   //now show the dialog
                   Color col = JColorChooser.showDialog(sendMsgButton, "Choose your background colour", Color.GRAY);
                   //when a colour is chosen it becomes the bg colour
                   theWholeApp.setBackground(col);
                   rpanel1.setBackground(col);
                   rpanel2.setBackground(col);
                   rpanel3.setBackground(col);
                   rpanel4.setBackground(col);
                   rpanel5.setBackground(col);
                   lpanel1.setBackground(col);
                   lpanel2.setBackground(col);
                   lpanel3.setBackground(col);
                   lpanel4.setBackground(col);
                   lpanel5.setBackground(col);
              //if the connect button is clicked
              if(event.getSource() == (connect))
                   //get the txt entered into ip addy field & port num fields with a text check...
                   if(hosty.getText().equals("") || portnumfd.getText().equals("") || nickName.getText().equals(""))
                        JOptionPane.showMessageDialog(this, "You cant connect! \nThis is because the either the \n0 - HostName\n 0 - Port Number \n0 - Your Nick \nIs Missing...");
                   else
                        //get details and connect
                        username = nickName.getText();
                        String ipay = hostfield.getText();
                        String porty = portnumfd.getText();
                        connectto(ipay,porty);
          * This method is similar to an append method in that it allows msgs recieved by the server to
          * be displayed in the conversation window. It also deals with the self comm mode as if its disabled
          * then no messages from the sender will be displayed.
         public void moveTextToConvo(String texty)
              //check
              if(ignoreyourself == true)
                   ignoreyourself = false;
              else
                   //If self comm is on the send message as normal
                   if(talktoself)
                        conversationDisplay.setText(conversationDisplay.getText() + texty);
                   else
                        //check message isnt sent by the current client - if it is ignore it!
                        if(texty.startsWith(nickName.getText()))
                             ignoreyourself = true;
                        else
                             conversationDisplay.setText(conversationDisplay.getText() + texty);
              //allows the scroll pane to move automatically with the conversation
              conversationDisplay.setCaretPosition(conversationDisplay.getText().length());
          * This method (connectto) is called if the button's clicked and also sets up a relation
          * between the client and clienttoserver class
         public void connectto(String ipa,String portNO)
              //portNO needs to be changed from string to int
              int portNum = new Integer(portNO).intValue();
              try
                   //creates a socket
                   socky = new Socket(ipa, portNum);
                   writer = new PrintWriter(socky.getOutputStream(), true);
                   ClienttoServer cts = new ClienttoServer(socky, this);
                   cts.runit();
                   //give user a prompt
                   JOptionPane.showMessageDialog(this, "You're now connected!");
              catch(UnknownHostException e)
                   System.err.println("Unknown host...");
                   //prompt the user
                   JOptionPane.showMessageDialog(this, "Failed to connect! \nPlease try again...");
              catch(IOException e)
                   System.err.println("Could Not Connect!");
                   //prompt user
                   JOptionPane.showMessageDialog(this, "Error! \nCould not connect - please try again!");
          * This method sends msgs from current client to server, sends username and then the message.
          * This is split into two different messages as the "\n" is used.
         public void printMessage(String mess)
              writer.println(usernamey.getText() + " says: \n" + mess);
              //then clear the text in the message creation area...
              createMsg.setText("");
          * Accessor method to retrieve userName
         public String getUName()
              return username;
          * Disconnect this user from the server so that they can no longer recieve/send messages
         public void dropconnection()
              try
                   //Start to close everything - informing user
                   writer.close();
                   socky.close();
                   //Give the user info on whats happening
                   JOptionPane.showMessageDialog(this, "You are now disconnected \nYou will no longer be able to \nsend and recieve messages");
                   System.out.println("A user has left the conversation...");
              catch (IOException e)
                   System.err.println("IOException " + e);
    The Server Class:
    import java.net.*;
    import java.io.*;
    * This class works in sync with the ServertoClient class in order to read
    * messages from clients and then send back out to all the active clients. Due to
    * the usage of threading multiple clients can use this server.
    * Once again some of this code is from Florians 2005 tutorial work.
    public class Server
         private ServerSocket server;
         private ServertoClient threads[];
         private static int portNo  = 2250;
         private static String Host = ""; //find method to retrieve ip
         private int maxPeeps = 20; //20 people can talk together but this can be altered
          * 1st Constructor - has no params
         public Server()
          * 2nd Constructor - allows for port number setting
         public Server(int portnumber)
              portNo = portnumber;
          * 3rd Constructor - allows for port number & max users
         public Server(int portnumber, int maxiusers)
              portNo = portnumber;
              maxPeeps = maxiusers;
          * This method is to constantly listen for possible messages from clients
         public void listener()
              //set the time out of method to just under a minute
              final int waitingTime = 500000000;
              //a boolean variable to keep it waiting
              boolean keepWait = true;
              //create a threads array of length maxpeeps
              threads = new ServertoClient[maxPeeps];
              //define a variable that will be used as a count of the no of threads
              int x = 0;
              try
                   //open a new socket on this port number
                   server = new ServerSocket(portNo);
              catch (IOException e)
                   System.err.println("IOException " + e);
                   return;
              //while the keepWait is true and the no. of threads is less than the max...
              while(keepWait && x < maxPeeps)
                   try
                        //set the timeout, this is the waitingTime (50 secs)
                        server.setSoTimeout(waitingTime);
                        //listen for connection to accept
                        Socket socky = server.accept();
                        System.out.println("A New User Has Connected");
                        //creates a new thread and adds it to array
                        threads[x] = new ServertoClient(this, socky);
                        //the thread begins
                        threads[x].start();
                   catch (InterruptedIOException e)
                        System.err.println("The Connection Timed Out...");
                        keepWait = false;
                   catch (IOException e)
                        System.err.println("IOException " + e);
                   x++; //increment no. of threads
              //if waitingTime is reached or there are too many threads then server closes
              try
                   server.close();
              catch(IOException e)
                   System.err.println("IOException " + e);
                   return;
          * This prints the string to all active threads
         public void printAll(String printy)
              for(int x = 0; x < threads.length; x++)
                   if(threads[x] !=null && threads[x].isAlive())
                        threads[x].sendMsg(printy);
          * Main method for the server, creates a new server and then continues to listen
          * for messages from different users
         public static void main(String[] args)
              Server chatsession = new Server();
              System.out.println("The Server Is Now Running on port NO: " + portNo);
              System.out.println("And IP Address: " + Host);
              chatsession.listener();
    [/code
    The ServertoClient Classimport java.lang.Thread;
    import java.net.*;
    import java.io.*;
    * This is the ClienttoServer class that acts as an intermediary between the server
    public class ClienttoServer extends Thread
         private Socket socky;
         private BufferedReader bready;
         private boolean active;
         private Client client;
         * This is the constructor to create a new client service
         public ClienttoServer(Socket socket, Client cli)
              socky = socket;
              active = false;
              client = cli;
              //try to read from the client
              try
                   bready = new BufferedReader(new InputStreamReader(socky.getInputStream()));
              catch (IOException e)
                   System.err.println("IOException " + e);
         * This method reads in from the client
         public void runit()
              active = true;
              while(active == true)
              {//continue to read in and then change the text in the conversation window
                   try
                        String message = bready.readLine();
                        client.moveTextToConvo(message + "\n");
                   catch (IOException e)
                        System.err.println("IOException " + e);
                        active = false;
    And finaly the servertoclient class
    import java.net.*;
    import java.io.*;
    import java.lang.Thread;
    * This clas provides the services that the server uses
    public class ServertoClient extends Thread
         private Socket socky;
         private Server server;
         private BufferedReader bready;
         private PrintWriter writer;
          * This constructor sets up the socket
         public ServertoClient(Server theServer, Socket theSocket)throws IOException
              socky = theSocket;
              server = theServer;
              //sets up the i/o streams
              writer = new PrintWriter(socky.getOutputStream(), true);
              bready = new BufferedReader(new InputStreamReader(socky.getInputStream()));
          * This method keeps listening until user disconnects
         public void run()
              boolean keepRunning = true;
              try
                   //keep listening 'til user disconnects
                   while(keepRunning = true)
                        final String tempmsg = bready.readLine();
                        //is there a message (if yes then print it!)
                        if(tempmsg == null)
                        else
                             server.printAll(tempmsg);
                   dropconnection();
              catch (IOException e)
                   System.err.println("IOException in thread " + Thread.currentThread() + ": " + e);
          * This method is for when a user disconnects from the server...
         public void dropconnection()
              try
                   bready.close();
                   writer.close();
                   socky.close();
              catch (IOException e)
                   System.err.println("IOException in thread " + Thread.currentThread() + ": " + e);
              System.out.println("A User Has Disconnected...");
          * This method prints the message
         public void sendMsg(String msg)
              writer.println(msg);
    }Thats it any help would be much appreciated
    Cheers.

    Like the previous poster indicated: try to find a minimal example that shows the error your experiencing.
    One thing that seems bogus is the Server.listener() method. For one thing, it can increment x even if no new connection has been established (e.g., x will be incremented if an exception is caught).

  • Time capsule problems in mixed apple windows network

    Hello
    I am facing issues with my home network.
    I am using a time capsule on the firm ware version 7.6, which is the newest to my knowledge (just updated)
    I have setup my time capsule with costum name and password. Time machine is off at the moment.
    I have setup a wireless network with costum name and password. I have not activated a guest network.
    In the network we use one windows laptop running on windows xp and a mac book pro running snow leopard.
    We both can acess the wireless network with our laptops. But the connection to the internet is shaky, Especially if there is another guest with a windows pc comming into the network (and we give him the network details) I loose connection to the internet for several days. Usually the issue resolves itself a couple of days after the guest has left.
    What could cause such a problem?
    Thank you in advance for your answers!
    Wolfi

    This type of question arises from time to time and is really hard to figure out.
    If you restart the TC does the problem go away immediately?
    What about if the TC is reset and redo the setup.. does it go?
    If you connect via ethernet does the problem exist or is it purely wireless?
    Does the PC that is added have a different computer name and different username and password on the local disk to yours?
    Try doing a manual wireless configuration. Set channels to fixed value. Change the wireless name for 5ghz so it is different to 2.4ghz. See if that makes an improvement.

  • HP Photosmart Plus B210a all-in-one won't display any networks in the list.

    Hi, I recently purchased a HP Photosmart Plus all in one printer and I've been having trouble with it from day one.
    First off, it won't connect wirelessly.
    It won't display any networks in the list when searched for, it won't take my network details when I manually input them and it won't take any static IP address I've tried from other suggestions.
    Secondly, the print quality is very bad. Streaks and fading are occuring and after using up 70% of my ink trying to sort it out through troubleshooting it's still bad.
    It's extremely important for me to be able to have web access using the printer as all members of my household use it and it'll get fustrating having to car laptops and computers around to print.
    Can anybody help at all?

    Top line says "The wireless radio is not functioning. Contact HP support"
    I take this as a very bad sign and needs replacing?
    The tests I done produce streaks, fading and lines. I printed off two photos, one from a memory card and one from a scan. The memory card produced heavy blocked lines of color and the scan was just dull.
    I'm using a Wanadoo Wireless Livebox and Windows 7 64 Bit
    One other question... is this like a brilliant printer for photos mainly? I'm a Graphics design student and although my final prints are made from home I would like accurate and decent printouts for my portfolios. Should I keep this or go for another one with similar features and better print quality?

Maybe you are looking for

  • 9i JDev download doesn't execute

    After some difficulties with Candidate Release 9.065, I was advised to download the production release 9.0.2 from Oracle. This I did yesterday (all 135MB, quite some time) I unzipped to appropriate home, and double-clicked (in WindowsNT) on home\jdev

  • Apps not booting

    On my 1GHz iBook G4, running OS X 10.3.9, 768MB RAM, after rebooting I try to start Mail and Safari (individually, of course) and neither start. The icon in the dock bounces a few times but neither will do anything beyond that. I then go and force qu

  • Second Admin User - keychain login?

    Recently added second Admin User (Spouse). When logged in to the second Admin User, being required to enter Keychain login password from first Admin User. This is for Safari and for other apps. If the second User is logged in at an administrative lev

  • Member function and member procedure inside an object type in Oracle.

    Hi All, Please do have a look at these codes and help me understand. I have no idea about this member function and member procedure. How do they work? Please explain me about this. Regards, BS2012 create type foo_type as object (   foo number,   memb

  • HT5557 How do you add a panel where readers can insert text as they read?

    Once published, I would like readers to be able to type their answers to questions as they read, so that they can return and see them there later. The questions which I have are not multiple choice. Eg. "What's one thing you would like to change abou