mvn clean install
mvn exec:exec -pl main
port 8000
Every 2 seconds the ServiceTest class will print a line of text to the console containing the following:
- Using an OSGI Service import (Scramble) it should print the following two things:
- A new TimeStamper instance, which is injected as a Provider, should print the current time
- A Singleton ScrambleDelegate, which is a constructor injected, should print some scrambled text
- Using Guice's CustomInjection functionality the next two things:
- A userId, which is pulled from a list of userIds at instantiation time
- A scope, which is pulled from a list of scopes at instantiation time
OSGI Service: { TimeStamper[2015/07/06 18:29:31] ScrambleDelegate[C@76a22b9c] } | Guice CustomInjections: {UserID[cjbooms] Scope[I'm a store...] }