Autopsy  4.14.0
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 2016-2019 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 // }
57  default void openCaseResources(CaseContext context) throws AutopsyServiceException {
58  /*
59  * Autopsy services may not have case-level resources.
60  */
61  }
62 
74  /*
75  * Autopsy services may not have case-level resources.
76  */
77  }
78 
79 // default void closeAppResources(ApplicationContext context) throws AutopsyServiceException {
80 // /*
81 // * Autopsy services may not have case-level resources.
82 // */
83 // }
88  public static class CaseContext {
89 
90  private final Case theCase;
92  private volatile boolean cancelRequested;
93 
102  public CaseContext(Case theCase, ProgressIndicator progressIndicator) {
103  this.theCase = theCase;
104  this.progressIndicator = progressIndicator;
105  this.cancelRequested = false;
106  }
107 
114  public Case getCase() {
115  return this.theCase;
116  }
117 
127  return this.progressIndicator;
128  }
129 
134  public void requestCancel() {
135  this.cancelRequested = true;
136  }
137 
145  public boolean cancelRequested() {
146  return this.cancelRequested;
147  }
148  }
149 
153  public static class AutopsyServiceException extends Exception {
154 
155  private static final long serialVersionUID = 1L;
156 
163  public AutopsyServiceException(String message) {
164  super(message);
165  }
166 
174  public AutopsyServiceException(String message, Throwable cause) {
175  super(message, cause);
176  }
177  }
178 }
default void openCaseResources(CaseContext context)
CaseContext(Case theCase, ProgressIndicator progressIndicator)
default void closeCaseResources(CaseContext context)

Copyright © 2012-2020 Basis Technology. Generated on: Wed Apr 8 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.