What's a "tagging interface"?

Java.util.EventListener is an empty interface, which, the API says, is "A tagging interface that all event listener interfaces must extend."
I've defined lots of custom event listeners and never extended EventListener. Am I missing something?

Java.util.EventListener is an empty interface, which,
the API says, is "A tagging interface that all event
listener interfaces must extend."
I've defined lots of custom event listeners and never
extended EventListener. Am I missing something?If you look at javax.swing.event.EventListenerList, you'll see that its methods take or retrieve instances of EventListener. If you want to dispatch events using this mechanism, which I believe is what Swing uses, you have to extend EventListener.
Personally, I consider it very confusing that these two are in separate packages. I think it would have been much more useful if the powers that be had defined a package java.util.event, and put generic event-handling classes and interfaces there (including an EventThread class!).

Similar Messages

  • Tagged Interface

    What is actually meant by Tagged Interface ?
    I am writing a class which is implementing an interface.
    can i make the interface such a way that its functions are not optionally implemented in the implementing class.
    My doubt is that we make implements serializable and most cases we dont implement readObject() or writeObject() , so how is class that is implementing Serializable interface is exempted from implementing these functions
    Looking forward for a positive reply
    Renjith.

    readObject and writeObject are not declared in the
    Serializable interface. Serializable does not define
    any methods or constants. That is why you don't need
    to implement anything. Object I/O code determines
    whether or not you class has the readObject and
    writeObject methods using reflection.Here's a slightly off-topic question, however. How come writeObject/readObject aren't defined like this:
    public Serializable readObject() throws IOException;
    public void writeObject(Serializable s) throws IOException;?

  • How to create Tagging Interface?

    Hello, Java expert around the world, pls help me on this:
    There are a few tagging interface in java's core such as java.rmi.Remote and java.io.Serialization.
    How to create customize tagging interface?

    We need it to mark a class!
    If your class implements Serializable then you are saying it is ok to be serialized.
    It's just a way to indicate that a class is capable of something, to tag it in some way.hmm...a class is capable of something....if a class implement java.io.Serializable, then what are the things that the new class capable to do?
    Where is the functionlity(method, or behaviour)? Since there is no method declared under this interface...

  • Firefox any version Mac, has a bug were it does not see or ask for the proxy username and password. This happens if you use a virtual tagged interface.

    Firefox any version Mac, has a bug were it does not see or ask for the proxy username and password. This happens if you use a virtual tagged interface. A recent network University policy change. The only way to fix this, is if you use a manual proxy configuration in Firefox. So all 100 + uni iMac's can only use Safari as I would need to do a profile push to all 300 students and I am unsure what file carries the proxy information.

    Firefox any version Mac, has a bug were it does not see or ask for the proxy username and password. This happens if you use a virtual tagged interface. A recent network University policy change. The only way to fix this, is if you use a manual proxy configuration in Firefox. So all 100 + uni iMac's can only use Safari as I would need to do a profile push to all 300 students and I am unsure what file carries the proxy information.

  • Tagging Interfaces

    What is the use of 'Tagging Interfaces' like Serializable or Coleable? They don't even contain any abstract methods to force the class implementing them to implement certain behaviour by over-riding those methods?

    They tell the class that is interested in them to treat the object differently if it implements the interface. For serializable and cloneable (clonable?), they confer extra abilities on the class implementing them, even though those abilities are actually provided from elsewhere. Kind of a creative use of interfaces, it's true.

  • What is a "Abstract Interface" ?

    According to JavaDoc, <code>HttpSession</code> is described as
    public abstract interface HttpSession.
    What is an "abstract interface" ?

    All interface's are implicitly abstract so declaring an interface abstract is a bit pointless.

  • fault name="NegativeCredit" ... what does fault tag mean

    Hi ,
    I was trying to understand the code generated for the CreditRating Service sample available with BPEL 10.1.2.
    Can anyone please explain what does the tag <fault> here mean. Does this get taken as an input variable into the 'process' method(operation). This is the first time I am seeing a fault tag along with the portType, I have come across input and output messages before, though not the fault tag. There is no explanation for the <fault> tag in the developer guide. Can anyone please explain.
    <portType name="CreditRatingService">
    <operation name="process">
    <input message="tns:CreditRatingServiceRequestMessage"/>
    <output message="tns:CreditRatingServiceResponseMessage"/>
    <fault name="NegativeCredit" message="tns:CreditRatingServiceFaultMessage" />
    </operation>
    </portType>

    Hi. This means operation "process" is synchronous, has input (naturally) = wait for message described type, has output = replies to client with described message, has fault = can add fault message to ouput message.
    I think that this way client haven't to parse output message to decide whether fault is occurred.
    Imagine synchronous process with catch branch. Standard Reply at the end of process has output and hasn't fault but in catch branch you can put another Reply with same output and fault. If process run out without exception, client get output message. If exception is occurred then client get output message with fault.

  • Multiple inheritance in tagging interface? Is it possible?

    I saw a code somewhere that goes like this:
    public interface Node extends Serializable, Clonable
    ...Is it possible? I know that Java doesn't allow multiple inheritance and that Serializable and Clonable are tagging interfaces where no method must be implemented by the programmer.

    KamenRiderZX wrote:
    I know that Java doesn't allow multiple inheritanceMore exactly: Java doesn't allow multiple inheritance of implementations. Inheriting multiple interfaces ("implements" for classes, "extends" for interfaces) is fine 'though.

  • What is an lockbox interface enhancement

    hi to all experts,
    what is an lockbox interface enhancement.How is it different from other enhancement

    Hi Mohammed.
    what is an lockbox interface enhancement.How is it different from other enhancement.
    Both are an enhacemement and no different interm of technical
    but for an lockbox interface enhancement  LOCKBOX is the name of key work in area of finance accounting (Lockbox identification to which the customer is to make payments).
    Hope it helps.
    Sayan.

  • What is an XML INTERFACE on BOXIR2/R3

    What is an XML-Interface on Business Objects?
    What are the advantages of Xml Interface?
    When it will be usefull?
    How it is different for webi-Interface?
    Edited by: mail raaz on May 20, 2009 6:15 PM

    Hi Denis,
    Yesterday our administrator asked me, he would like to install BO XIR3 application on XML-Interface enven i did not understand his intention.
    Please let me know if you have any inputs regarding on the same.
    I think,Infoview and web content is same as webi-interface... 
    I will wait for your early response.........

  • What is data base interface and the role it will play while retrieving data

    What is data base interface and the role it will play while retrieving data.

    Hi,
       check out the following link.
    http://help.sap.com/saphelp_nw04s/helpdata/en/97/68d64260752a78e10000000a155106/frameset.htm
    it says:
    Database Interface
    Interface to the database of the NetWeaver AS ABAP that is integrated in the ABAP-runtime environment. The statements of Open SQL and Native SQL access the database using the database interface. The database interface is responsible for data transport between business layer and persistence layer, automatic client handling, and SAP buffering.
    hope it helps.
    Regards,
    kinshuk

  • Few HFM questions, What is XBRL tages? when we use it?  User defined1,2,3?

    Hi professionals,
    1) What is XBRL tags? I never use it in HFM. I want to know it in a smile way with an example if possible
    2) What is user Defined 1,2,3. HFM application run by many users. So how they share it and what it means exactly?
    Please revert me
    Thanks
    Sarath

    1.) XBRL - http://en.wikipedia.org/wiki/XBRL
    You may or may not use this depending on the particular business.
    2.) UD1, UD2, UD3 are what you want them to be. They are basically "extra" dimensions or work areas which you can take advantage of. For example we use one of the UD fields to link our accounts with Tax Stream (I think it's One Source now....).
    If you end up in a position where you need more than 3 UD fields, you can subdivide them by. For instance if I put a value in UD1 like cou=US,con=NA I could use the split command on the field and divide out the values into unique pieces, etc.

  • What is the Standard Interface of Delivery

    Hi,
    what is the Standard Interface of Delivery in ECC 6.0,like we have Standard medruck interface in ECC 6.0

    You don't talk to a web-service with a stub - you talk to it with SOAP messages sent via HTTP.
    What the stub is protecting you from, is having to know how to construct the SOAP messages (which is a really tedious, error-prone process, if you're doing it by hand). Use WSCompile or WSDL2Java, and bless their little hearts every time you make a simple stub-call...
    Grant

  • j2ee-application .... what is this tag for???

    Hi,
    can anyone tell my why I should ever use this magic <j2ee-application....> Tag within the <security> Tag of a JNLP-File??? I never needed it and in my opinion nobody will ever need it....
    So what is this tag for??? What can I achieve with it?
    Thank you,
    Sven Haiges

    according to the book http://developer.java.sun.com/developer/Books/jnlp/
    j2ee-appplication-client-permissions does the following:
    When used with a trusted appliction (signed and explicitly accepted by the user), this subelement grants the below permissions:
    java.awt.AWTPermision (access to system clipboard)
    java.awt.AWTPermission (access to event queue)
    java.awt.AWTPermission (show window without warning banner)
    java.lang.RuntimePermission (allow exit of JVM)
    java.lang.RuntimePerimission (allow load library)
    java.lang.RuntimePermission (allow queue of print job)
    java.net.Socket.Permission (allow socket connectins)
    java.io.FilePermission (allow read/write files)
    java.io.Property permission (allow read properties)

  • What is a good interface to get LE's max # of tracks?

    I have heard goo things from folks using the FirePod, but what is a good interface for LE to get the max tracks it is capable of?

    Hey tele-player! LTNS!
    Well, I am still leaning towards the FirePod, but since I have no immediate plans to buy anything, maybe something new will come out by the time I get to a position that I can actually make a purchase.
    My day gig is being outsourced to India, and at my age, i really don't want to go out and look for another job. So I plan to do whatever else I can from home to try to make a living. Plus I am gonna get to play out again And I thought maybe I might offer my services to some of the young bands locally to help them record demos. So, this is a "down the road" situation for now. For that, I'll need to get Tiger as well as the FirePod, and a handful more mics than I have for starters.

Maybe you are looking for