public class Listener extends java.lang.Object implements PropertiesChecker
Constructor and Description |
---|
Listener()
Creates a new listener web server and binds it to the local port number specified in the i-net Clear Reports
configuration or to the default port number 9000.
|
Listener(boolean autodetectPort)
Creates a new listener web server and binds it to the local port number specified in the i-net Clear Reports
configuration or to the default port number 9000.
|
Listener(boolean autodetectPort,
java.lang.String bindAddress)
Creates a new listener web server and binds it to the local port number specified in the i-net Clear Reports
configuration or to the default port number 9000.
|
Listener(int port)
Creates a new listener web server and binds it to the local port number specified as port parameter.
|
Listener(boolean autodetectPort,
int port)
Creates a new listener web server and binds it to the local port number specified as port parameter.
|
Modifier and Type | Method and Description |
---|---|
void |
checkHtmlPageProperties(java.util.Properties props)
Deprecated.
As of i-net Clear Reports 14.1 use the configuration to set a PropertyChecker
|
void |
checkProperties(java.util.Properties props)
Deprecated.
As of i-net Clear Reports 14.1 use the configuration to set a PropertyChecker
|
void |
checkProperties(java.util.Properties props,
java.lang.Object req)
Deprecated.
As of i-net Clear Reports 14.1 use the configuration to set a PropertyChecker
|
void |
checkProperties(Engine engine,
java.util.Properties prop)
Deprecated.
As of i-net Clear Reports 14.1 use the configuration to set a PropertyChecker
|
void |
checkProperties(Engine engine,
java.util.Properties prop,
java.lang.Object req)
Deprecated.
As of i-net Clear Reports 14.1 use the configuration to set a PropertyChecker
|
int |
getPort()
Returns TCP/IP port number where the i-net Clear Reports application is listening for report requests.
|
java.lang.String |
getUrlString()
Returns the hostname and the tcp/ip port number where the i-net Clear Reports application is listening for report
requests.
|
boolean |
isRunning()
Returns whether the listener is currently running.
|
static void |
main(java.lang.String[] argv)
Starts the i-net Clear Reports server standalone.
|
void |
stop()
Stops the
Listener web server and closes all connectors. |
public Listener() throws java.io.IOException
java.io.IOException
- in case of IO error (e.g. port already in use)public Listener(boolean autodetectPort) throws java.io.IOException
autodetectPort
- if set to true
and the port number that is specified in the i-net Clear Reports
configuration is currently in use then the listener is automatically listening on the next free port number.
If set to false
you'll need to set a valid free port number in the i-net Clear Reports configuration
for the listener to start.java.io.IOException
- in case of IO error (e.g. port already in use)public Listener(boolean autodetectPort, java.lang.String bindAddress) throws java.io.IOException
autodetectPort
- if set to true
and the port number that is specified in the i-net Clear Reports
configuration is currently in use then the listener is automatically listening on the next free port number.
If set to false
you'll need to set a valid free port number in the i-net Clear Reports configuration
for the listener to start.bindAddress
- the IP address to bind the connector to. E.g. 127.0.0.1 to allow local access only.
null
if the connector should listen on every available IP.
only has an impact if loadFromConfiguration is set to true
java.io.IOException
- in case of IO error (e.g. port already in use)public Listener(int port) throws java.io.IOException
port
- the default port of the server socket, if 0 then the port specified in i-net Clear Reports
configuration or the default value 9000 will be used.java.io.IOException
- in case of IO error (e.g. port already in use)public Listener(boolean autodetectPort, int port) throws java.io.IOException
autodetectPort
- if set to true
and the port number that is specified in the i-net Clear Reports
configuration is currently in use then the listener is automatically listening on the next free port number.
If set to false
you'll need to set a valid free port number in the i-net Clear Reports configuration
for the listener to start.port
- the default port of the web server, if it is 0 then the port specified in the i-net Clear Reports
configuration or the default value 9000 will be used.java.io.IOException
- in case of IO error (e.g. port already in use)public static void main(java.lang.String[] argv)
argv
- Command line arguments are currently not supported. Use system properties
with prefix 'cc:' instead.public java.lang.String getUrlString()
java.lang.IllegalStateException
- if no connector was specifiedpublic int getPort()
java.lang.IllegalStateException
- if no connector was specified@Deprecated public void checkProperties(java.util.Properties props) throws ReportException
checkProperties(Properties, Object)
and is equivalent to
checkProperties(props, null) if i-net Clear Reports does not run as servlet.props
- The user properties.ReportException
- If an error occurred during checking the supplied properties with the current
PropertiesChecker. The ReportException will be send to the client and displayed in the Java viewer.checkProperties(Properties, Object)
@Deprecated public void checkProperties(java.util.Properties props, java.lang.Object req) throws ReportException
if(...) props.put("report", "file:///c:/my-report.rpt");
checkProperties
in interface PropertiesChecker
props
- The user properties. All keys are lowercase.req
- The javax.servlet.http.HttpServletRequest or null if not in a server.ReportException
- If an error occurred during checking the
supplied properties with the current PropertiesChecker.
The ReportException will be send to the client and displayed in the Java viewer.PropertiesChecker.checkProperties(Engine engine, Properties prop, Object req)
@Deprecated public void checkProperties(Engine engine, java.util.Properties prop) throws ReportException
checkProperties(Engine, Properties, Object)
and is equivalent to
checkProperties(engine, prop, null).EngineFactoryImpl
(recommended) or implement
EngineFactory
EngineFactory yourFactory;
Cache.setEngineFactory(yourFactory);
EngineFactory.getKey(Properties)
EngineFactory.createEngine(Properties)
engine
- The initialized engine that have parsed the rpt file already.prop
- The user properties.ReportException
- If an error occurred during checking the supplied properties with the current
PropertiesChecker. The ReportException will be send to the client and displayed in the Java viewer.EngineFactory
,
EngineFactoryImpl
,
Cache.setEngineFactory(EngineFactory)
,
checkProperties(Engine, Properties, Object)
@Deprecated public void checkProperties(Engine engine, java.util.Properties prop, java.lang.Object req) throws ReportException
engine.setSchema(...);
engine.setProperty(...);
checkProperties
in interface PropertiesChecker
engine
- The initialized engine that have parsed the rpt file already.prop
- The user properties. All keys are lowercase.req
- The javax.servlet.http.HttpServletRequest or null if not in a server.ReportException
- If an error occurred during checking the
supplied properties with the current PropertiesChecker.
The ReportException will be send to the client and displayed in the Java viewer.
@Deprecated public void checkHtmlPageProperties(java.util.Properties props) throws ReportException
checkHtmlPageProperties
in interface PropertiesChecker
props
- The properties of the html page. Any change to this properties object itself has absolutely no effect. All keys are lowercase.
See Example MyReportServlet_withMyHTMLProperties.java
.ReportException
- If an error occurred during checking the
supplied properties with the current PropertiesChecker.PropertiesChecker.checkProperties(Engine engine, Properties prop, Object req)
,
PropertiesChecker.checkProperties(Properties prop, Object req)
public void stop() throws java.io.IOException
Listener
web server and closes all connectors.java.io.IOException
- if an I/O error occurs when closing the connectors.Engine.stop()
,
Engine.stop(String)
,
Engine.stopAll()
public boolean isRunning()
Copyright © 1999-2018 by i-net software GmbH