All Packages    This Package  Previous  Next  

Interface sqlj.runtime.profile.util.ProfileIOContext

public interface interface ProfileIOContext
A profile IO context describes the information needed to read, load, customize, and write a serialized profile.

See Also:
CustomizerHarness

Variable Index

 o PIO_ERROR
Constant passed to close indicating that an error occured during profile customization.
 o PIO_MODIFIED
Constant passed to close indicating that the profile (or jar file) was modified, and therefore does not need to be updated.
 o PIO_UNMODIFIED
Constant passed to close indicating that the profile (or jar file) was not modified, and therefore does not need to be updated.

Method Index

 o close(int)
Closes any resources associated with this ProfileIOContext, renaming or removing resources as appropriate.
 o getErrorLog()
Return an error log into which customization messages are added.
 o getInputStream()
Returns an input stream from which the serialized profile can be read.
 o getLoader()
Return the profile loader instance to use in instantiating the profile contained in the input stream.
 o getOutputStream()
Returns an output stream into which a customized version of the serialized profile can be written.

Variables

 o PIO_UNMODIFIED
 public static final int PIO_UNMODIFIED
Constant passed to close indicating that the profile (or jar file) was not modified, and therefore does not need to be updated. Any data written to the stream returned by getOutputStream may be discarded.

See Also:
close
 o PIO_MODIFIED
 public static final int PIO_MODIFIED
Constant passed to close indicating that the profile (or jar file) was modified, and therefore does not need to be updated. Data written to the stream returned by getOutputStream should be recorded and saved.

See Also:
close
 o PIO_ERROR
 public static final int PIO_ERROR
Constant passed to close indicating that an error occured during profile customization. Any data written to the stream returned by getOutputStream should be disregarded.

See Also:
close

Methods

 o getInputStream
 public abstract InputStream getInputStream() throws IOException
Returns an input stream from which the serialized profile can be read. Each time this method is called, a new stream containing an unread profile should be returned. The stream is closed by the caller.

Throws: IOException
if an error occurs creating the input stream.
 o getOutputStream
 public abstract OutputStream getOutputStream() throws IOException
Returns an output stream into which a customized version of the serialized profile can be written. Typically, this will represent the same logical stream as was read by getInputStream. Each time this method is called, a new stream should be returned. The stream is closed by the caller.

Throws: IOException
if an error occurs creating the output stream.
 o getErrorLog
 public abstract ErrorLog getErrorLog()
Return an error log into which customization messages are added.

 o getLoader
 public abstract Loader getLoader()
Return the profile loader instance to use in instantiating the profile contained in the input stream. Returns null if the default profile loader is to be used.

See Also:
instantiate
 o close
 public abstract void close(int status) throws IOException
Closes any resources associated with this ProfileIOContext, renaming or removing resources as appropriate. The passed status indicates whether or not the profile was successfully written to the output stream returned by getOutputStream. This method is always called after getInputStream is called, and before a subsequent call to getInputStream is made.

Parameters:
status - one of the PIO_* constants
Throws: IOException
if this IOContext cannot be closed
See Also:
PIO_ERROR, PIO_UNMODIFIED, PIO_MODIFIED

All Packages    This Package  Previous  Next