This week's book giveaway is in the Open Source Projects forum.
We're giving away four copies of Eclipse Collections Categorically: Level up your programming game and have Donald Raab on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Regarding Plugin Interface

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Ranchers...hope to find clarifications for the below mentioned topics...

(1)A method in an Interface cannot have a body...but in case of the Interface org.apache.struts.action.Plugin the methods destroy() and init() have bodies..Please provide an explaination for this.The class org.apache.struts.tiles.TilesPlugin which implements Plugin does however override the above mentioned methods.

(2)The class org.apache.struts.tiles.TilesRequestProcessor extends RequestProcessor but does not override the processPreprocess(HttpServletRequest p1,HttpServletResponse p2){} method.Can anyone provide the steps how the steps takes place while using Tiles framework.
 
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by abhishek paul:

(1)A method in an Interface cannot have a body...but in case of the Interface org.apache.struts.action.Plugin the methods destroy() and init() have bodies..Please provide an explaination for this.The class org.apache.struts.tiles.TilesPlugin which implements Plugin does however override the above mentioned methods.



Where did you find the source for Plugin interface ? I just checked the source and found only method declarations.

Regards,
Reghu
 
abhishek paul
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The package content is as given below....let me know in case i have skipped something here.. !!The methods should end with semi colons and without curly braces...if not i need to revisit Kathy Sierra javascript: x()
Eek!

package org.apache.struts.action;

public interface PlugIn
{
//
// Methods
//
void destroy() { }

void init(org.apache.struts.action.ActionServlet p1, org.apache.struts.config.ModuleConfig p2) { }
}


[ April 29, 2008: Message edited by: abhishek paul ]
[ April 29, 2008: Message edited by: abhishek paul ]
 
Reghu Ram Thanumalayan
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the link i found from the web

Plugin source

Here, there is no method body. Could you provide the link from where you got this strange source
 
abhishek paul
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
..thanks Reghu this is exactly what i had intended it should be..while checking the "Go to Declaration" in the IDE (Jdeveloper) the Plugin Interface displayed the above code....anyways this clarifies the first point.

Please provide suggestions for the second one as well.


Thanks,
Abhishek.
 
bacon. tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic