use of javax.annotation.PreDestroy in project genius by opendaylight.
the class ItmDiagStatusProvider method close.
@PreDestroy
public void close() {
serviceDescriptor = new ServiceDescriptor(ITMConstants.ITM_SERVICE_NAME, ServiceState.UNREGISTERED, "Service Closed");
diagStatusService.report(serviceDescriptor);
}
use of javax.annotation.PreDestroy in project genius by opendaylight.
the class IfmDiagStatusProvider method close.
@PreDestroy
public void close() {
serviceDescriptor = new ServiceDescriptor(IfmConstants.INTERFACE_SERVICE_NAME, ServiceState.UNREGISTERED, "Service Closed");
diagStatusService.report(serviceDescriptor);
}
use of javax.annotation.PreDestroy in project genius by opendaylight.
the class DatastoreServiceStatusProvider method close.
@PreDestroy
public void close() {
serviceDescriptor = new ServiceDescriptor(DATASTORE_SERVICE_NAME, ServiceState.UNREGISTERED, "Service Closed");
diagStatusService.report(serviceDescriptor);
}
use of javax.annotation.PreDestroy in project eclipse.platform.runtime by eclipse.
the class EventObjectSupplier method dispose.
@SuppressWarnings("rawtypes")
@PreDestroy
public void dispose() {
ServiceRegistration[] array;
synchronized (registrations) {
Collection<ServiceRegistration<EventHandler>> values = registrations.values();
array = values.toArray(new ServiceRegistration[values.size()]);
registrations.clear();
}
for (ServiceRegistration element : array) {
element.unregister();
}
}
use of javax.annotation.PreDestroy in project dataverse by IQSS.
the class ThemeWidgetFragment method cleanupTempDirectory.
@PreDestroy
public /**
* Cleanup by deleting temp directory and uploaded files
*/
void cleanupTempDirectory() {
try {
if (tempDir != null) {
for (File f : tempDir.listFiles()) {
Files.deleteIfExists(f.toPath());
}
Files.deleteIfExists(tempDir.toPath());
}
} catch (IOException e) {
// improve error handling
throw new RuntimeException("Error deleting temp directory", e);
}
uploadedFile = null;
tempDir = null;
}
Aggregations