|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectthinkmap.datasource.stream.StreamWriter
public abstract class StreamWriter
Superclass of all StreamWriters. Provides a common pattern of implementation.
| Field Summary | |
|---|---|
protected Exception |
error
|
protected IStreamFactory |
factory
|
protected IStreamFormat |
format
|
protected OutputStream |
out
|
| Fields inherited from interface thinkmap.datasource.IEntityHandler |
|---|
ADD_REQUEST, ATTR_CACHE_REVISION, DELETE_REQUEST, EDGE, ENTITY_REQUEST, FLAG_NO_CACHE, FLAGS, FLAGS_DEFAULT, ID_REQUEST, LIST_ENTITIES_REQUEST, METADATA_REQUEST, NODE, NULL_REQUEST, QUERY_MAX_RESULTS, QUERY_STARTING_RESULT_NUMBER, QUERY_STRING, RELATED_REQUEST, RESERVED_ID_MAX, SINK, SOURCE, TOTAL_RESULTS, UNLIMITED_RESULTS, UPDATE_REQUEST |
| Constructor Summary | |
|---|---|
StreamWriter(IStreamFormat sf,
IStreamFactory isf)
Creates a new StreamWriter object. |
|
| Method Summary | |
|---|---|
protected abstract void |
_beginMessage(int type)
|
protected abstract void |
_endMessage()
|
void |
beginMessage(int type)
Begin a message. |
void |
endMessage()
End a message. |
Exception |
getError()
Get the error that occurred, if any. |
OutputStream |
getStream()
Get the OutputStream this writes to. |
IStreamFactory |
getStreamFactory()
Get the IStreamFactory. |
IStreamFormat |
getStreamFormat()
Get the IStreamFormat. |
protected void |
setError(Exception e)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface thinkmap.datasource.IEntityHandler |
|---|
attribute, beginEntity, beginEntityMD, beginId, beginRelatedEntity, beginRelatedList, endEntity, endEntityMD, endId, endRelatedEntity, endRelatedList, error, fatalError, idKey, idKeyMD, property, propertyMD |
| Field Detail |
|---|
protected OutputStream out
protected IStreamFormat format
protected IStreamFactory factory
protected Exception error
| Constructor Detail |
|---|
public StreamWriter(IStreamFormat sf,
IStreamFactory isf)
sf - IStreamFormat creating thisisf - IStreamFactory creating this| Method Detail |
|---|
public IStreamFormat getStreamFormat()
public IStreamFactory getStreamFactory()
public OutputStream getStream()
public Exception getError()
protected void setError(Exception e)
public final void beginMessage(int type)
IEntityHandler
beginMessage in interface IEntityHandlertype - one of the request types below, eg RELATED_REQUESTpublic final void endMessage()
IEntityHandler
endMessage in interface IEntityHandlerprotected abstract void _beginMessage(int type)
protected abstract void _endMessage()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||