|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.addsimplicity.anicetus.io.FileDeliveryAdapter
public class FileDeliveryAdapter
The file delivery adapater will publish events to a file or stream. This adapter is provided to assist with development debugging where running a bus may not be necessary or convenient.
| Constructor Summary | |
|---|---|
FileDeliveryAdapter()
|
|
| Method Summary | |
|---|---|
void |
close()
Close the current file stream, if it was opened by the delivery adapter. |
void |
destroy()
The destroy method is called by the Spring framework when this bean is being disposed. |
ExceptionHandler |
getExceptionHandler()
Get the current exception handler that is in effect. |
TelemetryEncoder |
getTranslator()
Get the current session translator that is in effect. |
java.io.Writer |
getWriter()
Get the current stream where telemetry is being written. |
void |
sendTelemetry(GlobalInfo telemetry)
Send the telemetry to the file. |
void |
setExceptionHandler(ExceptionHandler handler)
Set the exception handler that will receive exceptions that occur. |
void |
setFile(java.lang.String fileName)
Set the file where events are written. |
void |
setTranslator(TelemetryEncoder translator)
Set the translator that will be used for this session. |
void |
setWriter(java.io.Writer writer)
Set the stream to use for writing telemetry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileDeliveryAdapter()
| Method Detail |
|---|
public void close()
throws java.io.IOException
java.io.IOException - if an error occurs while attempting to close the stream.
public void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.ExceptionDisposableBean.destroy()public ExceptionHandler getExceptionHandler()
public TelemetryEncoder getTranslator()
public java.io.Writer getWriter()
public void sendTelemetry(GlobalInfo telemetry)
sendTelemetry in interface DeliveryAdaptertelemetry - The telemetry artifact to write to the file.DeliveryAdapter.sendTelemetry(org.addsimplicity.anicetus.entity.GlobalInfo)public void setExceptionHandler(ExceptionHandler handler)
setExceptionHandler in interface DeliveryAdapterhandler - The handler to receive exceptions.
public void setFile(java.lang.String fileName)
throws java.io.IOException
fileName - The name of the file.
java.io.IOException - if the file does not exist and cannot be created or opened for
write.public void setTranslator(TelemetryEncoder translator)
translator - The translator to use.JsonEncoderpublic void setWriter(java.io.Writer writer)
writer - The stream to be used for writing telemetry.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||