Autopsy  4.9.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
AutopsyService.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2016 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.appservices;
20 
23 
29 public interface AutopsyService {
30 
36  String getServiceName();
37 
38 // Status getStatus() {
39 //
40 // }
41 // default void openAppResources(ApplicationContext context) throws AutopsyServiceException {
42 // /*
43 // * Autopsy services may not have application-level resources.
44 // */
45 // }
55  default void openCaseResources(CaseContext context) throws AutopsyServiceException {
56  /*
57  * Autopsy services may not have case-level resources.
58  */
59  }
60 
70  /*
71  * Autopsy services may not have case-level resources.
72  */
73  }
74 
75 // default void closeAppResources(ApplicationContext context) throws AutopsyServiceException {
76 // /*
77 // * Autopsy services may not have case-level resources.
78 // */
79 // }
84  public static class CaseContext {
85 
86  private final Case theCase;
88  private volatile boolean cancelRequested;
89 
98  public CaseContext(Case theCase, ProgressIndicator progressIndicator) {
99  this.theCase = theCase;
100  this.progressIndicator = progressIndicator;
101  this.cancelRequested = false;
102  }
103 
110  public Case getCase() {
111  return this.theCase;
112  }
113 
121  return this.progressIndicator;
122  }
123 
128  public void requestCancel() {
129  this.cancelRequested = true;
130  }
131 
139  public boolean cancelRequested() {
140  return this.cancelRequested;
141  }
142  }
143 
147  public static class AutopsyServiceException extends Exception {
148 
149  private static final long serialVersionUID = 1L;
150 
157  public AutopsyServiceException(String message) {
158  super(message);
159  }
160 
168  public AutopsyServiceException(String message, Throwable cause) {
169  super(message, cause);
170  }
171  }
172 }
default void openCaseResources(CaseContext context)
CaseContext(Case theCase, ProgressIndicator progressIndicator)
default void closeCaseResources(CaseContext context)

Copyright © 2012-2018 Basis Technology. Generated on: Tue Dec 18 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.