de.schlichtherle.truezip.fs.inst.InstrumentingDirector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truezip-extension-jmx-jul Show documentation
Show all versions of truezip-extension-jmx-jul Show documentation
This module provides a file system manager and an I/O pool service
for managing and monitoring TrueZIP via JMX and java.util.logging.
Add the JAR artifact of this module to the run time class path to
make its services available for service location in the client API
modules.
The newest version!
/*
* Copyright (C) 2005-2015 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package de.schlichtherle.truezip.fs.inst;
import de.schlichtherle.truezip.entry.Entry;
import de.schlichtherle.truezip.fs.FsCompositeDriver;
import de.schlichtherle.truezip.fs.FsController;
import de.schlichtherle.truezip.fs.FsManager;
import de.schlichtherle.truezip.fs.FsModel;
import de.schlichtherle.truezip.socket.IOPool;
import de.schlichtherle.truezip.socket.InputSocket;
import de.schlichtherle.truezip.socket.OutputSocket;
import javax.annotation.concurrent.Immutable;
/**
* @param the type of the instrumenting driver.
* @author Christian Schlichtherle
*/
@Immutable
public abstract class InstrumentingDirector> {
public abstract > IOPool instrument(IOPool pool);
public FsManager instrument(FsManager manager) {
return new InstrumentingManager(manager, this);
}
public FsCompositeDriver instrument(FsCompositeDriver driver, InstrumentingManager context) {
return new InstrumentingCompositeDriver(driver, this);
}
public FsModel instrument(FsModel model, InstrumentingCompositeDriver context) {
return model; //new InstrumentingModel(model, this);
}
public abstract FsController> instrument(FsController> controller, InstrumentingManager context);
public abstract FsController> instrument(FsController> controller, InstrumentingCompositeDriver context);
public > InputSocket instrument(InputSocket input, InstrumentingIOPool.Buffer context) {
return instrument(input);
}
public InputSocket instrument(InputSocket input, InstrumentingController context) {
return instrument(input);
}
protected InputSocket instrument(InputSocket input) {
return input; //new InstrumentingInputSocket(input, this);
}
public > OutputSocket instrument(OutputSocket output, InstrumentingIOPool.Buffer context) {
return instrument(output);
}
public OutputSocket instrument(OutputSocket output, InstrumentingController context) {
return instrument(output);
}
protected OutputSocket instrument(OutputSocket output) {
return output; //new InstrumentingOutputSocket(output, this);
}
}