Services
Register global runtime services in your BoxLang module (Java only)
Creating a Service
import ortus.boxlang.runtime.services.IService;
import ortus.boxlang.runtime.BoxRuntime;
import ortus.boxlang.runtime.scopes.Key;
public class MyService implements IService {
@Override
public Key getName() {
return Key.of( "MyService" );
}
@Override
public void onStartup( BoxRuntime runtime ) {
System.out.println( "MyService started!" );
}
@Override
public void onShutdown( Boolean force ) {
System.out.println( "MyService shutting down!" );
}
@Override
public void onConfigurationLoad() {
// Called when configuration is loaded
}
}Accessing Services
Service Lifecycle
Next Steps
Last updated
Was this helpful?
