public class SuspendableOutputStream extends FilterOutputStream implements JobStatus
Modifier and Type | Class and Description |
---|---|
static class |
SuspendableOutputStream.StreamStoppedException |
JobStatus.State
out
STREAM_PATH_SUFFIX
Constructor and Description |
---|
SuspendableOutputStream(OutputStream os) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
JobStatus.State[] |
getAllowedHumanStateChanges()
Indicate which state changes a human user can currently request,
based on our state.
|
Date |
getCreationTime()
Not implemented
|
String |
getPath()
Not implemented
|
JobProgressInfo |
getProgressInfo()
Not implemented
|
JobStatus.State |
getState()
Return the job's current state
|
String |
getStreamPath()
Not implemented
|
void |
requestStateChange(JobStatus.State s)
Only SUSPENDED, STOP, and RUNNING make sense here
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
flush
public SuspendableOutputStream(OutputStream os)
public void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] b) throws IOException
write
in class FilterOutputStream
IOException
public void write(int b) throws IOException
write
in class FilterOutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
public JobStatus.State getState()
JobStatus
public void requestStateChange(JobStatus.State s)
requestStateChange
in interface JobStatus
public JobStatus.State[] getAllowedHumanStateChanges()
JobStatus
getAllowedHumanStateChanges
in interface JobStatus
public String getPath()
getPath
in interface JobStatus
UnsupportedOperationException
public String getStreamPath()
getStreamPath
in interface JobStatus
UnsupportedOperationException
public Date getCreationTime()
getCreationTime
in interface JobStatus
UnsupportedOperationException
public JobProgressInfo getProgressInfo()
getProgressInfo
in interface JobStatus
UnsupportedOperationException
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.