Sub Class_Globals
Private mResp As ServletResponse
End Sub
Public Sub Initialize
End Sub
Sub Handle(req As ServletRequest, resp As ServletResponse)
mResp = resp
Dim j As HttpJob
j.Initialize("j", Me)
j.Download(...)
StartMessageLoop '<----------
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success Then
File.Copy2(Job.GetInputStream, mResp.OutputStream)
Else
resp.SendError(500, Job.ErrorMessage)
End If
StopMessageLoop '<---------
End Sub