listener

Spring security: adding "On unsuccessful login event listener"

I'm new to Spring Security. How do I add an event listener which will be called as a user logs in successfully? Also I need to get some kind of unique session ID in this listener which should be available further on. I need this ID to synchronize with another server. ...

Proper coupling for multiple listeners that need to accessed shared state data

Working with a traditional listener callback model. I have several listeners that collect various stuff. Each listener's collected stuff is inside the listener in internal structures. The problem is that I want some of the listeners to be aware of some of the "stuff" in the other listeners. I enforce listener registration order, so if ...

how do i start a program (say calc.exe) based on existence of some file (1.htm) via scheduler?

Hi, I need to start a program based on existence of some file (1.htm) on the same machine using scheduler. I don't want to write any extra code. is it possibele by using that is already on windows for e.g listener etc. 1.html sometimes exist and doesnt' exist sometimes. So strictly I need to run (calc.exe) only when 1.htm exists. Basi...

In C# how could I listen to a COM (Serial) Port that is already open?

I am using a program that talks to my COMM port, but I have made another program that I want to "sniff" the comm port messages and perform it's own actions against those messages in addition. Is this possible in .NET c#? ...

Java Listener inheritance

I have a java class which fires custom java events. The structure of the code is the following: public class AEvent extends EventObject { ... } public interface AListener extends EventListener { public void event1(AEvent event); } public class A { public synchronized void addAListener(AListener l) { .. } public synchroni...

Java listener must inherit from java.util.EventListener - why?

In the javadoc it says that EventListener is "A tagging interface that all event listener interfaces must extend." Why is that? What's the significance of making a custom listener implement EventListner? Is there any special handling for EventListner somewhere? ...

Is there an idiomatic way to listen for changes to the DOM using the Prototype library?

I'm trying to add a listener to DOM change events. I was hoping something as simple as 'dom:loaded' was baked into Prototype. I'm not sure of the 'Prototype-way' to handle this. EDIT: I cannot control every case in which the DOM may be altered, so I can't get away with firing a custom event on every DOM change. ...

File changed listener in Java

I'd like to be notified when a file has been changed in the file system. I have found nothing but a thread that polls the lastModified File property and clearly this solution is not optimal. ...

How to listen for File>New>Project event in eclipse

Hi, I am creating an eclipse plugin which should listen for and handle the event generated, when the user selects File > New > Project. I am urgently in need of a solution for this. Please share with me the codes or ideas that you have as soon as possible. ...

Does this match your definition of a Listener Object?

Overview: In my project, all of the UI Components that are rendered in DOM/HTML, are stored/managed as Javascript objects of type Component. Each Component Object contains a ComponentListener class which listens for events coming from the DOM/HTML rendering, and also listens for events fired to the Component that it might receive fro...

Listening to a UDP broadcast with threads.

Hi, I'm broadcasting a simple message to ..*.255 (changing to 255 the last part of my ip) and i'm trying to listen to it. the code returns no error but i'm not receiving anything. In wireshark I can see the broacast is sent correctly, but with a different port each time (I don't know if that's a big deal). Here's some parts of my code. ...

Java Listener not starting Under Tomcat

In my Tomcat logs (catalina) I am getting the following error preventing my application from starting up: SEVERE: Error listenerStart 24-Mar-2009 13:23:10 org.apache.catalina.core.StandardContext start SEVERE: Context [/exampleA] startup failed due to previous errors I do not know why I am getting this. In my web.xml I have the follo...

Should I use a Listener or Observer?

Hi, I have a dropdown box in my GUI which shows the contents of an ArrayList in another class. New objects can be added to the ArrayList elsewhere in the GUI, so I need to know when it is updated, so I can refresh the dropdown menu. From what I can gather, my two options are to extend the ArrayList class to allow me to add my own change...

How to handle a closing application event in Java?

Having a console application, a server accepting several connections from clients, is it possible to have a listener or an event on a closing application? I want, in this event, tell all connected clients to gently disconnect before the application really closes itself. Any solution? Thank you! ...

Events For Window Dragging in Java

I'm trying to implement an OS X drawer like feature in Java, and so I'm going to have one window hiding under another. However when I drag the primary window (JFrame) I need to send updates as it moves to the secondary window (JWindow) below. So it'd be something like this… --------------- | |---------- | JFrame | ...

How do I modify existing AS3 events so that I can pass data?

So I want a way to set up events so that I can pass data without creating closures \ memory leaks. This is as far as I have got: package com.events { import flash.events.Event; public class CustomEvent extends Event { public static const REMOVED_FROM_STAGE:String = "removedFromStage"; public var data:*; public f...

Event listener in Java without app having focus? (Global keypress detection)

I've been searching for a while and everybody seems to think this is not possible using just Java, so I'll give SO a shot ;) Is there any way to have my Java application listen for events (key events in particular) while another unrelated application has window focus? In my situation, I'm looking to detect when the user has pressed the ...

Android - stopping NEW_OUTGOING_CALL events from looping?

I have a BroadcastReceiver catching ACTION_NEW_OUTGOING_CALL events. In the onReceive() method I'm sending the supplied number to a new ListActivity, where the user gets to choose various new destination numbers from a list. When the user selects a new number from the list I'm then starting a new ACTION_CALL intent with the new number ...

XMPP Smack API RosterListener + Database Change

I'm writing an XMPP client in Java using the Smack API. I registered a roster listener for each user, and the Smack API calls... public void entriesAdded(Collection arg0) {} ... each time it notices a roster addition. Does anyone know if this listener will be set off if the database changes but not through the Smack API createEntry(...

JQuery URL Event Listeners

I'm trying to get JQuery to highlight an element based on the link ID selector For Example <a href="#thisid">Goto Element with ID name</a> Highlights the element below. <div id="thisid" class="isNowHighlighted">FooIsCoolButNotBetterThenBar</div> Iv tried searching for relevant plugins but no joy. Any ideas? ...