i-net Clear Reports

com.inet.report
Class ReportSocket

java.lang.Object
  extended by com.inet.report.ReportSocket

public class ReportSocket
extends java.lang.Object

This class implements the communication between the client and the engine that created the requested report. The ReportSocket reads parameters from the client and sends them to the engine. The result of the engine is send back to the client

You need this class only if you use your own middle tier and you want control the communication.

Socket socket = serverSocket.accept();
BufferedInputStream inBuf = new BufferedInputStream(socket.getInputStream());
inBuf.mark(1540);
....
verify the request of the client
....
inBuf.reset();
ReportSocket reportSocket = new ReportSocket(socket);
reportSocket.setPropertiesChecker(yourPropertiesChecker);
reportSocket.setInputStream(inBuf);
reportSocket.execute();


See Also:
Listener

Constructor Summary
ReportSocket(java.net.Socket s)
          Construct a new report-socket based on socket s.
 
Method Summary
 void execute()
          This method executes the ReportSocket to get requests from clients.
 void setInputStream(java.io.InputStream i)
          With this method you can override the ReportSocket's InputStream.
 void setOutputStream(java.io.OutputStream o)
          With this method you can override the ReportSocket's OutputStream.
 void setPropertiesChecker(PropertiesChecker c)
          With this method you can set the methods to check HTML and REPORT properties.
 

Constructor Detail

ReportSocket

public ReportSocket(java.net.Socket s)
Construct a new report-socket based on socket s.

Parameters:
s - The socket you've received via an accept call for example
Method Detail

execute

public void execute()
This method executes the ReportSocket to get requests from clients. Before you execute the report generation you'll want to set your own properties via via setProperties().


setInputStream

public void setInputStream(java.io.InputStream i)
With this method you can override the ReportSocket's InputStream. Use this if you have a previously red data from SocketInputStream.

Parameters:
i - The input stream that this ReportSocket should use instead of its own input stream.

setOutputStream

public void setOutputStream(java.io.OutputStream o)
With this method you can override the ReportSocket's OutputStream.

Parameters:
o - The output stream that this ReportSocket should use instead of its own output stream.

setPropertiesChecker

public void setPropertiesChecker(PropertiesChecker c)
With this method you can set the methods to check HTML and REPORT properties. If this method is used, all further ReportServlets will use this checker.

Parameters:
c - The class that implements PropertiesChecker.

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH