incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Huang <Alex.Hu...@citrix.com>
Subject RE: Cloudstack Cloud-Core Question
Date Mon, 28 Jan 2013 21:41:45 GMT
Joe,

Any interface you see that ends with Manager is an internal interface.  No parameter checks,
acl, etc should happen with method calling that interface.  Any interface that ends with Service
is meant to be an external interface.  Any method from that interface should do parameter
validation etc.   After it did that work, it should call the an equivalent method in the 
Manager interface.

-  Some argue and I agree that the two interfaces should have two different implementations.
 It would have serve for better separation between that code.  Today, you will find that line
being muddled in the implementation class because not everyone knew/remember that there's
such a division.

- To tell the difference, you should find any interface ending with Service on it is in the
-api package which can be used by plugins to make calls back into cloudstack.  Any interface
ending with Manager is not available in the -api package so unless you have a compiler dependency
on the -server package, you shouldn't be able to reference them.

--Alex

> -----Original Message-----
> From: Joe San [mailto:codeintheopen@gmail.com]
> Sent: Monday, January 28, 2013 12:59 PM
> To: cloudstack-dev@incubator.apache.org
> Subject: Cloudstack Cloud-Core Question
> 
> Hallo Cloudstack developers,
> 
> I just started exploring on the source code for Cloudstack and in
> particular, I'm currently looking at the cloud-server maven project. The
> first thing that caught my attention was the AccountManagerImpl.java. This
> implements 3 interfaces. But the AccountManager and AccountService
> seems to
> be from the same heirarchy. Why is that the AccountManagerImpl.java has
> both these interfaces in the implements clause?
> 
> Regards,
> Jothi

Mime
View raw message