Someone please help me to understand

This was a 'brief' tutorial implementing callbacks in Java, i cant undersand what is going on, can anyone help. Its designed to illustrate interfaces. I know how interfaces work so you dont have to explain that. Thanks so much
public interface InterestingEvent
public void interestingEvent ();
This gives us a grip on any objects of classes that implement the interface. So, we need not concern ourselves with any other extraneous type information. This is much nicer than hacking trampoline C functions that use the data field of widgets to hold an object pointer when using C++ code with Motif.
The class that will signal the event needs to expect objects that implement the InterestingEvent interface and then invoke the interestingEvent() method as appropriate.
public class EventNotifier
private InterestingEvent ie;
private boolean somethingHappened;
public EventNotifier (InterestingEvent event)
ie = event;
somethingHappened = false;
public void doWork ()
// Check the predicate, which is set elsewhere.
if (somethingHappened)
// Signal the even by invoking the interface's method.
ie.interestingEvent ();
In that example, I used the somethingHappened predicate to track whether or not the event should be triggered. In many instances, the very fact that the method was called is enough to warrant signaling the interestingEvent().
The code that wishes to receive the event notification must implement the InterestingEvent
interface and just pass a reference to itself to the event notifier.
public class CallMe implements InterestingEvent
private EventNotifier en;
public CallMe ()
// Create the event notifier and pass ourself to it.
en = new EventNotifier (this);
// Define the actual handler for the event.
public void interestingEvent ()
// Wow! Something really interesting must have occurred!
// Do something...

It looks to me like EventNotifier is a class that detects some event and notifies another object that the event occurred. When an EventNotifier is created, an object that implements the InterestingEvent interface is passed and is referenced thru the ie variable. When EventNotifier detects the event, it calls the interestingEvent() method of the object implementing the interface.
This is similar to how ActionListener/ActionEvent works. It would make more sense to me to call the interface InterestingEventListener.

Similar Messages

  • I wonder if it is possible to hack the iphone. because a friend received a bad message me and I never send the messenger .. Is  someone please help me understand?

    I wonder if it is possible to hack the iphone? because a friend received a bad message me and i never send the messenger. is someone please help me

    It wasn't your iPhone that was hacked, but your email account (or
    messaging account) that was hacked. Immediately change all your
    passwords for such accounts.

  • My MacBook Pro iTunes movie purchase is not showing in iTunes store movie purchases nor does it show on my iPad or Apple TV.  Can someone please help me with a solution?  Thanks.

      First of all, I live in Ho Chi Minh City, Vietnam. Sometimes, I use a VPN to search on the web here. I purchased Toy Story 3 on my MacBook Pro 2011 OS/X - Lion through iTunes.  I initially had trouble downloading it which may be due to being on and off the VPN but after a while it finally downloaded and shows up in my iTunes library on my MacBook. 
      Under my Apple ID account (which is the only Apple ID account I have), I look under purchase history and it shows that I paid for Toy Story which is where I got my Order # from.  But if you go to the iTunes Store then to the Quick Links then click on Purchased, under all my Movies, it does NOT show Toy Story 3 as one of my movies.
      Now when I go to my iPad (3rd gen.), Toy Story 3 does not show up under purchased movies (all or not on my iPad).  It does not show up on my Apple TV as well.  If I want to have Toy Story 3 on my iPad or Apple TV, then it says I have to purchase it again.
      I have searched for help via Apple support communities but so far none of their solutions have worked for me.  I have tried logging off iTunes & App Store on iPad and also shutting down the iPad.  I also made sure that under iTunes Preferences>Store that iTunes in the Clouds purchases is checked. Can someone please help me with this?  Your consideration is greatly appreciated.  Thanks.

    Thanks King_Penguin for taking time to read and reply. 
    I just purchased this movie on Thursday, May 15, so just a few days ago.  I have never had any trouble whatsoever since I have been in Vietnam.  I have downloaded several movies and even music and they have all synced to my respected Apple products except for this purchase. 
    Sorry, I don't quite understand what you mean by studios and different versions.  Could you please explain? 
    I checked my purchased list in my purchase history under my account and there are no hidden items. 

  • Hi, I am wondering why my iphone won't send pictures through messages, I have MMS on and I have tried sending it with 3G on aswell and still doesn't work. Someone please help me :)

    Hi, I am wondering why my iphone won't send pictures through messages, I have MMS on and I have tried sending it with 3G on aswell and still doesn't work. Someone please help me :)

    Hey lozza567,
    Thanks for the question. I understand that you are experiencing issues sending MMS messages. The following resource may provide a solution:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Issues with sending and receiving MMS
    You will need these to send and receive MMS:
    - An iPhone 3G or later.
    - iOS 3.1 or later.
    - A cellular data connection. MMS isn't available if you are using only Wi-Fi.
    - A domestic MMS plan from your cellular provider. You may need an international messaging plan to send MMS to an international contact. Contact your carrier for more information.
    - A roaming MMS when using a cellular provider's network different from your billing cellular provider's network. Learn more about roaming and contact your carrier for more information.
    To resolve issues with sending and receiving MMS, follow these steps first
    1. Go to Settings and turn airplane mode off.
    2. Go to Settings > Messages and turn MMS Messaging on.
    3. Go to Settings > Cellular and turn Cellular Data on.
    4. Go to Settings > Cellular and turn Data Roaming on if you are roaming on a cellular provider network different from your billing provider's network.
    5. Verify that you have a cellular data connection in the status bar at the top left of your iPhone.
    6. Go to Settings and turn Wi-Fi off. Open Safari and navigate to www.apple.com to verify that you have a data connection. Turn Wi-Fi back on to continue using Wi-Fi for other features. If your cellular data connection isn't available, follow these steps.
    7. Verify that you can send and receive SMS. If you are unable to send and receive SMS, see the "Issues with sending and receiving SMS" section, above.
    8. MMS may not be available while on a call. Only 3G and faster GSM networks support simultaneous data and voice calls. Learn more about which network your phone supports.
    9. Restart your iPhone.
    10. Tap Settings > General > Reset > Reset Network Settings on your iPhone.
    11. Reseat your SIM card.
    If you are still unable to send or receive MMS, follow these steps
    1. Make sure that the contact trying to message you isn't blocked in Settings > Messages > Blocked.
    2. Go to Settings > Messages and turn on group messaging if you are sending a group message.
    3. Make sure that you are using the area code with the contact's phone number. When sending messages internationally, you also need the contact's international code.
    4. Verify a "Pay as you go" MMS plan has enough available balance. Contact your carrier if unsure of your MMS plan or available balance.
    5. If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    6. If the issue occurs with a specific contact or contacts, delete and re-create the contact from the Contacts application. Create a new message to the newly created contact and try again.
    7. Back up and restore your iPhone as new.
    8. If your carrier has recently ported your phone number, the porting process may not be complete. Contact your carrier to confirm that the porting process is complete.
    9. Contact your carrier to verify that you are provisioned to send SMS and are in an area with cellular coverage.
    10. Contact your carrier to verify that there are no blocks or filters placed on your wireless account preventing you from sending SMS.
    11. Your carrier may require APN settings to be modified to use MMS. Learn more about when you should adjust APN settings.
    Thanks,
    Matt M.

  • (sigh) Can someone please help??? I'm ready to throw in the towel on my SECOND Mic

    So my first Zen Micro froze on me. No amount of tech support could save it. I returned it and received a new replacement. Within days my replacement had begun to freeze, and I would bravely pull out the battery and reboot it. I think (keep your fingers crossed) that I've unstuck whatever that bug was. NOW - my new issue - the dreaded "No license to play - please sync from PC" error. So, reluctantly, I downloaded the 2..05 Beta firmware, which as far as I understood it, resolved this issue specifically. After a successful download and install, I rebooted in hopes that it would be fixed. Well, it's still giving me the error. I cannot for the life of me figure out what I am doing wrong. And I am down to one download on all of my Napster 2 Go songs (due to the same problem on my first Micro). So I have three choices:
    ) Ask all of you what I can to do get this resolved easily.
    2) Delete my entire library, and use my last sync license and load it all onto my Micro again (which is a good hour project)
    3) Gi've up an buy an iPod. I am pulling out my hair in frustration, and I'm telling you... I always felt the same way you all did about Apple and the iPod. But the reality is, NONE of my friends have my harware/software issues. All I ask for is two consecuti've weeks of listening to my MP3 player without license issues, frozen hard dri'ves, reboots, pulling out the battery numerous times, etc. I just want to listen.... turn it off.... and know that it will turn back on again when I want it to.
    Someone please help, and convince me that I should give this one last shot!!

    megasister wrote:
    3) Gi've up an buy an iPod. I am pulling out my hair in frustration, and I'm telling you... I always felt the same way you all did about Apple and the iPod. But the reality is, NONE of my friends have my harware/software issues. All I ask for is two consecuti've weeks of listening to my MP3 player without license issues, frozen hard dri'ves, reboots, pulling out the battery numerous times, etc. I just want to listen.... turn it off.... and know that it will turn back on again when I want it to.
    Someone please help, and convince me that I should give this one last shot!!
    Well, it's perfectly understandable that your iPod-bearing friends don't have issues with N2Go, because they can't use it!
    So I guess you have to determine whether your problems lie with the actual player or the N2Go service.
    Do you have problems playing/synching songs you've ripped yourself or that you've bought from a service other than N2Go?

  • Why isnt my itouch not connecting to the wifi? everytime i try to conncect to a network and then i put in the password, it says unable to connect to this network! why is not working?????????? someone please help me!!!

    Why isnt my itouch not connecting to the wifi? everytime I try to connect to a network and i put in the password it says "unable to connect to this network" why isnt working?! the password is correct and everything. I just dont understand why its not working. Someone please help me! thanks

    Did it ever work with this WiFi system?
    Do other devices work with this WiFi system?

  • Someone please help me...6 months and getting nowh...

    Ok so it has now officially been SIX months since I placed an order for broadband (just normal ADSL broadband, not fancy fibre optic) and I still have NOTHING!
    Over the last couple of months, I have been in touch with a lovely lady from the 'BT Order Management' team based in Dundee, who has been calling me every so often with an update. But now these calls and updates have stopped, I can't get in touch anyone at BT who can help me and I am getting to the end of my tether.
    BT are blaming it on Openreach - apparently underground work needs to be done, clearing blockages, laying cables etc. but I don't understand why it is taking so long when plenty of my neighbours are getting connected and even upgraded to fibre.
    To top it all off BT keeping take money from my account to pay for the non-existing service which should have been in place in July. I was told I would be refunded nearly a month ago but still no refund.
    Someone PLEASE help me...I can't even put into words how frustrating the whole situation is.
    Thanks, Hannah

    Hi hannahbee23, 
    Thanks for your post and welcome to the community. 
    I am sorry for the delay in getting your broadband on. I will certainly take a look at this for you and see if things can be speeded up. 
    Please send me in your details using the "Contact The Mods" link found in my profile and I will be in touch to help. 
    Thnx,
    OlgaC 
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • HT1766 Hi there, could someone please help me, i didnt have my icloud on before my iphone 4s broke. I have always used iTunes and everything was backed up on there and now im finding it hard to restore my phone with contacts, photos etc.

    Hi there, could someone please help me, i didnt have my icloud on before my iphone 4s broke. I have always used iTunes and everything was backed up on there and now im finding it hard to restore my phone with contacts, photos etc.

        Dear Tylerkeefe,
    Good morning. Getting notifications that you are close to exceeding your allowance can certainly be alarming. It would be my pleasure to help put your mind at ease.
    I understand you are not streaming movies, music, etc. Which these features will use a lot of data. Are you using the Mobile Hotspot on your phone. This may also cause you to exceed your data allowance quickly if you do not power if off after you are done using the feature. To turn off mobile hostpot tap settings>general>personal hotspot>off. Do you have any third party applications that you have installed that may be running a lot of data?
    To ensure applications are not consistently running in the background do the following press the menu button at the bottom of your phone twice. All the open apps will then appear. Select and hold the bottom of the screen. A minus sign will then appear in the top left of each app. Select each minus sign to close out the application.
    I hope the information given will help clarify what is using a lot of data on your phone. Should you have further questions or concerns, please feel free to reach out to us.
    Thank You,
    MichelleS_VZW
    VZW Support
    Follow us on Twitter @VZWSUPPORT

  • I'm getting the run-around. Can someone please help me with a rebate problem?

    I purchased a Samsung W/D from Best Buy with the free vacuum offer. It was delivered and I submitted my rebate request. The submission page said to wait 6 to 8 weeks for processing. I waited 8 weeks and then became concerned. When I called the rebate center they said they had no record of my submission. Obviously, the online process failed. I understand technology doesn't always work, but the operator and manager told me I would now not be able to get my rebate and only offered a mailing address to complain. I am EXTREMELY frustrated. First, because the only reason I purchased these units was for the rebate and now I cannot return them to Best Buy because of the time elapsed. Second, if I was aware that there was a problem with the submission I would have been able to fix the situation. The website said all was OK, and all the information said to wait 6-8 weeks. Why would I have checked in before that time? Now I'm told I'm too late to fix it??? All I want is the vacuum cleaner I was promised when I purchased the W/D. Can someone please help me?

    Hello ChadMelton,
    I have a hard time passing up offers for free products, so I understand how such an offer could influence your decision to buy. I'm wholly disappointed to read, though, that your rebate experience didn't go smoothly and that the manufacturer seems to have been less than cooperative. I would be frustrated too under such circumstances!
    I was unable to locate your purchase using the information you provided when you signed up for Best Buy Unboxed. I would like to look into this situation on your behalf, but will need more information to begin. If you will please send me a private message that includes your full name, telephone number, order number and/or the Customer Service PIN from your purchase receipt, I'll get started.
    I'm very grateful that you wrote to us with your concerns.
    Sincerely,

  • My ipod touch is disabled! Someone please help!

    My friend gave me his ipod touch because someone got a hold of it and put a password on it and then tried to guess it and he even asked the person what the password was but he wouldnt tell him so but then he just kept guessing and it kept going into lock down so he decided to restore it but he forgot about his computer crashing and he didnt have the orginal computer that it was setup on so he just gave up and he told me that i could have it and i've been trying to get it undisabled for about a month now.
    The ipod touch is a 16gb 2nd generations if that info helps with anything.
    Someone please help me!
    Message was edited by: nahbrahitsjesse

    I'm having a very similar problem. Let me clear this up and see if I'm right. Okay, so your friend gave you this itouch, and he put a pin on it. You didn't know the pin and after you entered it several times it locks for good. It asks you to connect it to the original computer, but it doesn't exist anymore, and when you connect it to your computer it says that you have to unlock the itouch before you can connect it to the computer, but at the same time it doesn't give you the keypad on the itouch anymore to unlock it. You, like me, have tried the 5 R's but can't restore it due to it not showing up on itunes when you connect it. I understand this isn't answering the question, I'm just clearing up what you said and adding parts you didn't because I am have the same exact problem.

  • I tried updating my iPod 5th gen to iOS 8 but it only shows me a picture of the iTunes logo and a charger at the bottom, I'm not sure what this means or what I need to do. Can someone please help me?

    I tried updating my iPod 5th gen to iOS 8 but it only shows me a picture of the iTunes logo and a charger at the bottom, I'm not sure what this means or what I need to do. Can someone please help me?

    After restoring to factory settings/new iPod you will then have to restore from backup
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:                         
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • My iPhone 4 will not sync my new voice memos from the "Voice Memos" app to my computer. This is frustrating, should not be so hard, can someone please help. I use PC with windows 7 with iPhone version 6.1.3 and iTunes most recent. Thanks.

    My iPhone 4 will not sync my new voice memos from the "Voice Memos" app to my computer. This is frustrating, should not be so hard, can someone please help. I use PC with windows 7 with iPhone version 6.1.3 and iTunes most recent. Thanks.

    In the Music tab of iTunes, do you have 'Include Voice Memos' checked?

  • Songs in Ipod but not in itunes library. no option to back up so i can restore. Will someone please help me?

    Ok, see, i was dowloading some songs off of http://www.youtube-mp3.org. I dragged the songs into my itunes library, but when i looked, they weren't in there. so i looked at my ipod and the songs i downloaded were on it! i dont know how either! i tried to back up my downloaded songs so i could restore it to see if that would help, but there wasn't an option for me to back up my ipod when i right clicked on it. i looked atsome of the other forums about the "AppData" solution. it said to delete the corrupted file if there was one, but i dont know what to look for. can someone please help me? this is driving me crazy.

    See this older post from another forum member Zevoneer covering the different ways and software available to help you with this task.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • CS6 - I need help installing it on my window 8.1 computer. I have already download both required files, restarted the computer and cannot get them to install. Adobe are the very worst at customer support - cn someone please help. I have already spent seve

    Can someone please help me install CS6 on my computer. I have downloaded both files. I have my serial number

    Hi Rozie,
    Can you please share the error message that you are getting while trying to complete the installation?
    Cheers,
    Kartikay Sharma

  • TS1389 im trying to sync my ipod and everything went well but when i tried to get all my songs back off my laptop it wont let me it tells me to authorize my computer but then it doesnt give me that option im in despret need of help someone please help.

    okay so my cousin downloaded a bunch of songs to my ipod and i couldnt listen to them so i decided to sync my ipod, i thought everything went well but i guess i was wrong because i saved all my apps to my laptop and my music also. but now i cant get any of it back on my ipod it says i have to authorize my computer so when i go to itunes and attempt to authorize my laptop it doesnt give me that option ive tried everything someone please help thanks...

    Open itunes, Click the word Store at the top of your computer screen
    On a windows computer, if it does not show, then click Alt-S

Maybe you are looking for