Autopsy  4.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.framework;
20 
22 
28 public interface AutopsyService {
29 
35  String getServiceName();
36 
37 // Status getStatus() {
38 //
39 // }
40 // default void openAppResources(ApplicationContext context) throws AutopsyServiceException {
41 // /*
42 // * Autopsy services may not have application-level resources.
43 // */
44 // }
54  default void openCaseResources(CaseContext context) throws AutopsyServiceException {
55  /*
56  * Autopsy services may not have case-level resources.
57  */
58  }
59 
69  /*
70  * Autopsy services may not have case-level resources.
71  */
72  }
73 
74 // default void closeAppResources(ApplicationContext context) throws AutopsyServiceException {
75 // /*
76 // * Autopsy services may not have case-level resources.
77 // */
78 // }
83  public static class CaseContext {
84 
85  private final Case theCase;
87  private volatile boolean cancelRequested;
88 
97  public CaseContext(Case theCase, ProgressIndicator progressIndicator) {
98  this.theCase = theCase;
99  this.progressIndicator = progressIndicator;
100  this.cancelRequested = false;
101  }
102 
109  public Case getCase() {
110  return this.theCase;
111  }
112 
120  return this.progressIndicator;
121  }
122 
127  public void requestCancel() {
128  this.cancelRequested = true;
129  }
130 
138  public boolean cancelRequested() {
139  return this.cancelRequested;
140  }
141  }
142 
146  public static class AutopsyServiceException extends Exception {
147 
148  private static final long serialVersionUID = 1L;
149 
156  public AutopsyServiceException(String message) {
157  super(message);
158  }
159 
167  public AutopsyServiceException(String message, Throwable cause) {
168  super(message, cause);
169  }
170  }
171 }
default void closeCaseResources(CaseContext context)
default void openCaseResources(CaseContext context)
CaseContext(Case theCase, ProgressIndicator progressIndicator)

Copyright © 2012-2016 Basis Technology. Generated on: Mon Apr 24 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.