IBMStreams com.ibm.streamsx.inet Toolkit > com.ibm.streamsx.inet 2.9.6 > com.ibm.streamsx.inet.rest > HTTPTupleView
The fixed URL /ports/info returns meta-data (using JSON) about all of the Streams ports that have associated URLs.
HTTPTupleView, HTTPTupleInjection, HTTPXMLInjection and WebContext embed a Jetty webserver and all operator invocations in an SPL application that are co-located/fused in same partition (PE) will share a common Jetty instance. Thus by fusing these operators together with a common port value, a single web-server serving a single SPL application can be created. This sharing of the web-server by fusing multiple operators allows the operators to be logically connected in the SPL graph, rather than a single operator with multiple unrelated streams being connected to it.
Static content in the sub-directory html of the application's opt directory will also be served by the embedded web-server, thus allowing a complete web-application with live data to be served by an SPL application. The default URL for the web-server resolves to {application_dir}/opt/html/index.html.
Operators that support the context and contextResourceBase SPL parameters will serve static files from the contextResourceBase directory rooted at the supplied context path.
Optional: certificateAlias, context, contextResourceBase, headers, keyPassword, keyStore, keyStorePassword, partitionKey, port, trustStore, trustStorePassword
Windowed input port whose tuples will be available using a HTTP GET request with a URL using port index 0.
Optional windowed input ports whose tuples will be available using a HTTP GET request a URL with the corresponding port index.
Optional: certificateAlias, context, contextResourceBase, headers, keyPassword, keyStore, keyStorePassword, partitionKey, port, trustStore, trustStorePassword
Alias of the certificate to use in the key store. When this parameter is set all connections use HTTPS.
Define a URL context path that maps to the resources defined bycontextResourceBase. This allows a composite that invokes this operator in a toolkit to provide resources regardless of the value of the application's data directory. For example setting it to maps would result in the URL /maps/index.html mapping to the file index.html in the directory defined by contextResourceBase. Requires the parameter contextResourceBase to be set. If when the operator is initialized the context already exists then no action is taken. This allows multiple independent composites in the same toolkit to have common context and contextResourceBase settings, typically to point to a single set of HTML and Javascript resources for the toolkit.
If the operator provides URLs for its input or output ports then they are placed in the this context when this parameter is set. This then provides fixed locations for the URLs regardless of the depth of the operator invocation in the main composite.
Only a single context per invocation is supported.
Directory location of resources that will be available through the the URL context defined by the parameter context. Typically used to allow a toolkit to provide a set of resources in a fixed location. The set of resources is recommended to be stored in the application_dir/opt directory, which is automatically included in the bundle by default. Path of this directory can be absolute or relative, if relative path is specified then it is relative to the application directory. A set of default resources is included in the toolkit directory under ToolkitDir/opt/resources and will be loaded by the operator. This default resources can be viewed at http://hostname:8080/streamsx.inet.resources. A path within the application is obtained using the SPL function getThisToolkitDir(). Thus a composite in the file maps.spl in the namespace directory com.acme.streams.apps.map might have the following setting to map http://127.0.0.1:8080/maps to opt/resources/mapinfo in the application.
param context: “maps” contextResourceBase: getThisToolkitDir() + “/opt/resources/mapinfo”
List of headers to insert into the http reply. Formatted as header:value
Password to the certificate. If not provided, defaults to the value of keyStorePassword.
URL to the key store containing the certificate. If a relative file path then it is taken as relative to the application directory.
Password to the key store.
Names of attributes to partition the window by. If the cardinality of this parameter is > 1,then every value represents one attribute name. If the cadinality equals to 1, the value may contain one attribute name or a comma separated list of attribute names.
Port number for the embedded Jetty HTTP server. Defaults to 8080.
URL to the trust store containing client certificates. If a relative file path then it is taken as relative to the application directory. When this parameter is set, client authentication is required.
Password to the trust store.