Implemented first SCR component
This commit is contained in:
parent
00cb859cd9
commit
c6bee21cee
16 changed files with 149 additions and 3 deletions
|
|
@ -41,6 +41,11 @@ public class GDXAppVrGem4Activator implements BundleActivator {
|
|||
public void start(final BundleContext context) {
|
||||
// LOG.info("GDXAppVrGem4Activator started");
|
||||
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
|
||||
ServiceReference<SystemWarpTerminal> termRef = context.getServiceReference(SystemWarpTerminal.class);
|
||||
SystemWarpTerminal terminal = context.getService(termRef);
|
||||
|
||||
|
|
@ -162,7 +167,7 @@ public class GDXAppVrGem4Activator implements BundleActivator {
|
|||
} else {
|
||||
bootScreen.bootLine("vrGEM4: chains resolved.");
|
||||
try {
|
||||
Thread.sleep(5000);
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
Gdx.app.postRunnable(new Runnable() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4;
|
||||
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpLogger;
|
||||
import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip;
|
||||
|
||||
@Component
|
||||
public class TestComponent {
|
||||
|
||||
@Reference
|
||||
private SystemWarpLogger log;
|
||||
|
||||
@Reference
|
||||
private SystemWarpShip warpShip;
|
||||
|
||||
@Activate
|
||||
void open() {
|
||||
log.info(this, "Activated warpEngine: {}", warpShip.getWarpShip().theShip().getEngine());
|
||||
}
|
||||
|
||||
@Deactivate
|
||||
void close() {
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue