• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is the business requirement for Marker Interface

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Could any one please be so kind to help me knowing the business purpose for a Marker Interface. Also, need the list of Marker Interfaces in Java. Many thanks for your help!

Regards.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe Google can help you get started.
 
Prasanna Lakshmi Tallapaka
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jonas Isberg,

Many thanks for your reply. This was implicit and is going on. But not of much help.

Could any one else help me out.

Many thanks!

Regards.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you need a list of marker interfaces in Java? And do you mean a list of the marker interfaces included in the standard JDK?
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Prasanna Lakshmi Tallapaka wrote:
Many thanks for your reply. This was implicit and is going on. But not of much help.



Can you explain to us why it didn't help? We can't elaborate on your issue if we don't know why.

And explaining what is a marker interface... etc. when the google links does a good job is just a bit silly.



As for the "business requirement" part of your question, that doesn't really make sense. The "marker interface" is a technique (or pattern, for those who like that terminology). It may be used indirectly to solve a "business requirement", but otherwise, is unrelated.

Henry
 
Prasanna Lakshmi Tallapaka
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Henry Wong/David Newton,

Thanks for your responses. I am aware of what a marker interface is. But was not aware as which business requirement would drive a technologist to implement it. Otherwise, even it is fine to think that it is just used for the purpose. Eg : java.io.Serializable is a marker interface implementing which serializes an object. Similarly, java.lang.Cloneable. Thought if I could know some more to store in my KB and share with needy.

I would be glad to know the marker interfaces in standard JDK.

Many thanks to you.

Regards.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is an essentially infinite number of ways a marker interface could be used (although these days annotations are probably the preferred choice--marker interfaces were always a bit suspect to me). They're used any time there's a need to indicate or implement capabilities or possibilities outside of a strict class hierarchy.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think in business it is used because it is easy to understand which class object is going to be serialzed although for that they don't have to implement any method of it, but it is easy understanding for the coder so the mistakes can be avoided.........
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@kaustubh: You're referring to Serializable, I assume. It's not just to "avoid mistakes", it's to tell the JDK that the object may be serialized. And you do need to provide a serialVersionUID even though no methods need to be implemented.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But was not aware as which business requirement would drive a technologist to implement it.


It is extremely rare for business requirements to drive technology decisions on such a low level, as Henry pointed out.

You can find a (probably incomplete) list of marker interfaces in the FAQ.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:It is extremely rare for business requirements to drive technology decisions on such a low level


Unless you have one of those bosses that reads a term somewhere and decides it needs to be used
 
Prasanna Lakshmi Tallapaka
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Helo all,

That was fantastic to receive a bunch of responses. Many thanks to all of you. This sufficed my query at last.

Many thanks again.

Regards.
 
reply
    Bookmark Topic Watch Topic
  • New Topic