|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.gridlab.gat.io.FileOutputStream
public class FileOutputStream
A FileOutputStream represents a connection to open file, the file may be
either remote or local. See FileOutputStream
.
Constructor Summary | |
---|---|
FileOutputStream(org.gridlab.gat.io.FileOutputStreamInterface out)
Do not use this constructur, it is for internal GAT use. |
Method Summary | |
---|---|
void |
addMetricListener(MetricListener metricListener,
Metric metric)
This method adds the passed instance of a MetricListener to the
list of MetricListener s which are notified of MetricEvents by an
instance of this class. |
void |
close()
See OutputStream.close() . |
boolean |
equals(Object arg0)
See Object.equals(java.lang.Object) . |
void |
flush()
See OutputStream.flush() . |
org.gridlab.gat.io.FileOutputStreamInterface |
getFileOutputStreamInterface()
Returns the FileOutputStreamInterface object associated with this FileOutputStream . |
MetricEvent |
getMeasurement(Metric metric)
Returns a MetricEvent that represents the measured Metric . |
MetricDefinition |
getMetricDefinitionByName(String name)
Gets the MetricDefinition using its name . |
List<MetricDefinition> |
getMetricDefinitions()
This method returns a List of MetricDefinition
instances. |
int |
hashCode()
See Object.hashCode() . |
void |
removeMetricListener(MetricListener metricListener,
Metric metric)
Removes the passed MetricListener from the List
of MetricListener s which are notified of MetricEvents
corresponding to the passed Metric instance. |
String |
toString()
See Object.toString() . |
void |
write(byte[] arg0)
See OutputStream.write(byte[]) . |
void |
write(byte[] arg0,
int arg1,
int arg2)
See OutputStream.write(byte[], int, int) . |
void |
write(int arg0)
See OutputStream.write(int) . |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileOutputStream(org.gridlab.gat.io.FileOutputStreamInterface out)
Method Detail |
---|
public org.gridlab.gat.io.FileOutputStreamInterface getFileOutputStreamInterface()
FileOutputStream
. The FileOutputStreamInterface offers the same
functionality as the FileOutputStream
object. The difference
between the FileInputStreamInterface object and the FileOutputStream
object is that the FileOutputStreamInterface is an internal GAT object
and it will throw GATInvocationException
s upon failures, whereas
the FileOutputStream object would have default values.
public void addMetricListener(MetricListener metricListener, Metric metric) throws GATInvocationException
MetricListener
to the
list of MetricListener
s which are notified of MetricEvents by an
instance of this class. The passed MetricListener
is only
notified of MetricEvents which correspond to Metric
instance
passed to this method.
addMetricListener
in interface Monitorable
metricListener
- The MetricListener
to notify of MetricEventsmetric
- The Metric
corresponding to the MetricEvents for
which the passed MetricListener
will be notified
GATInvocationException
- The MetricListener
cannot be addedpublic MetricEvent getMeasurement(Metric metric) throws GATInvocationException
MetricEvent
that represents the measured Metric
.
getMeasurement
in interface Monitorable
MetricEvent
that represents the measured Metric
.
GATInvocationException
- the measurement failedpublic MetricDefinition getMetricDefinitionByName(String name) throws GATInvocationException
MetricDefinition
using its name
.
getMetricDefinitionByName
in interface Monitorable
name
- The MetricDefinition name
MetricDefinition
with the given name
GATInvocationException
- An error occurred while getting the list of
Metric
s or no Metric
with this name
existspublic void close() throws IOException
OutputStream.close()
.
close
in interface Closeable
close
in class OutputStream
IOException
public boolean equals(Object arg0)
Object.equals(java.lang.Object)
.
equals
in class Object
public void flush() throws IOException
OutputStream.flush()
.
flush
in interface Flushable
flush
in class OutputStream
IOException
public List<MetricDefinition> getMetricDefinitions() throws GATInvocationException
List
of MetricDefinition
instances. Each instance in this List
is a
MetricDefinition
which can be monitored on this instance.
getMetricDefinitions
in interface Monitorable
List
of MetricDefinition
instances.
Each instance in this List
is a Metric
which can be monitored on this instance
GATInvocationException
- An error occurred while getting the list of metricspublic int hashCode()
Object.hashCode()
.
hashCode
in class Object
public void removeMetricListener(MetricListener metricListener, Metric metric) throws GATInvocationException
MetricListener
from the List
of MetricListener
s which are notified of MetricEvents
corresponding to the passed Metric
instance.
removeMetricListener
in interface Monitorable
metricListener
- The MetricListener
to notify of MetricEventsmetric
- The Metric
corresponding to the MetricEvents for
which the passed MetricListener
has been notified
GATInvocationException
- The MetricListener
cannot be removedpublic String toString()
Object.toString()
.
toString
in class Object
public void write(byte[] arg0) throws IOException
OutputStream.write(byte[])
.
write
in class OutputStream
IOException
public void write(byte[] arg0, int arg1, int arg2) throws IOException
OutputStream.write(byte[], int, int)
.
write
in class OutputStream
IOException
public void write(int arg0) throws IOException
OutputStream.write(int)
.
write
in class OutputStream
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |