HTTP Handlers

The yFiles FLEX .NET server API provides several HTTP handlers that facilitate the most common tasks in a web diagramming application. This section briefly introduces these handlers.

Class LoadGraphHandler

LoadGraphHandler is an abstract HTTP handler that allows to read a file from an arbitrary input stream and send it to the client. Subclasses will only have to override the GetInputStream method.

Class SaveGraphHandler

SaveGraphHandler is an abstract HTTP handler that allows to save a graph that was sent from the client. SaveGraphHandler uses either a parameter of the request or the request input stream to read the data that is to be saved. Subclasses only have to override the CreateSaveStream method. If the graph is sent as a form parameter, the corresponding parameter name has to be passed to the constructor of SaveGraphHandler.

Class DownloadHandler

DownloadHandler is a ready-to-use HTTP handler that can be used for saving a graph on the client. The response is sent using the attachment content type, so that the client application will show a download dialog. DownloadHandler uses either a parameter of the request or the request input stream to read the data that is to be saved on the client. If the graph is sent as a form parameter, the corresponding parameter name has to be passed to the constructor of DownloadHandler.

Class UploadHandler

UploadHandler is a ready-to-use HTTP handler that can be used for loading a graph from the client's file system. The data is retrieved from the request's input stream sent back in the response. This servlet expects "multipart/form-data" as sent from a call to flash.net.FileReference.upload or a UploadHandler.

Class ExportHandler

ExportHandler is a ready-to-use HTTP handler that simply takes the export data from the request and creates a file download for it. The data is either taken from the response parameter provided in the constructor, or the request's input stream is used.

For customization, developers can override getExportDataStream.