Package: StateWriter

StateWriter

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2008, 2010 VMware Inc.
3: * All rights reserved. This program and the accompanying materials
4: * are made available under the terms of the Eclipse Public License v1.0
5: * which accompanies this distribution, and is available at
6: * http://www.eclipse.org/legal/epl-v10.html
7: *
8: * Contributors:
9: * VMware Inc. - initial contribution
10: *******************************************************************************/
11:
12: package org.eclipse.virgo.nano.serviceability.dump.internal;
13:
14: import java.io.File;
15: import java.io.IOException;
16:
17: import org.eclipse.osgi.service.resolver.State;
18:
19:
20: /**
21: * A <code>StateWriter</code> is used to write a {@link State} to disk.
22: *
23: * <p />
24: *
25: * <strong>Concurrent Semantics</strong><br />
26: * Implementations must be thread-safe.
27: *
28: */
29: public interface StateWriter {
30:
31: /**
32: * Writes the given <code>State</code> to the given <code>output</code> location.
33: *
34: * @param state The <code>State</code> to write
35: * @param outputDir The directory to which it should be written.
36: *
37: * @throws IOException if a failure occurs when writing the state
38: */
39: void writeState(State state, File outputDir) throws IOException;
40: }