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.