|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdemo.org.powermock.examples.tutorial.staticmocking.impl.ServiceRegistrator
public class ServiceRegistrator
An "OSGi"-ish implementation of the IServiceRegistrator interface.
The test for this class demonstrates static mocking as well as getting and
setting internal state.
| Constructor Summary | |
|---|---|
ServiceRegistrator()
Default constructor, initializes internal state. |
|
| Method Summary | |
|---|---|
long |
registerService(String name,
Object serviceImplementation)
Registers a service to the service framework. |
void |
unregisterService(long id)
Unregisters a service from the service framework. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceRegistrator()
| Method Detail |
|---|
public long registerService(String name,
Object serviceImplementation)
registerService in interface IServiceRegistratorname - The name of the service the register.serviceImplementation - The implementation of the service.
public void unregisterService(long id)
unregisterService in interface IServiceRegistratorid - The id of the service that should be removed. The id was
generated by IServiceRegistrator.registerService(String, Object).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||