WebSocketReceiver
从指定的WebSocket服务器收到WebSocket的消息。产生功能的每个接收到消息时,该消息的内容放置到指定的属性。每个进入功能将导致WebSocketReceiver初始化到指定的WebSocket服务器的连接。变压器将阻止在等待直到远程主机关闭连接到接收的WebSocket消息。
Usage Notes
The performance of this transformer is dependent on the amount of memory allocated to the Java Virtual Machine (JVM). The following environment variables allow you to specify memory available to Java Plugins:
- FME_JVM_MIN_HEAP_SIZE:初始堆大小初始化JVM。默认值是1024K。
- FME_JVM_MAX_HEAP_SIZE: Maximum heap size for initializing JVM. Default value is 16384K.
如果不设置,JVM的应用默认值。如果置位,该值必须是1024K的倍数(例如,4M和64M,或4096K和32768K)。
Note:To pass additional parameters used by FME to the Java Virtual Machine, use the JAVA_TOOL_OPTIONS environment variable.
Input Ports
This transformer accepts any feature.
输出端口
Features containing the data that has been received from the specified WebSocket server.
参数
The URL of the remote WebSocket server that the WebSocketReceiver will connect to in order to receive WebSocket messages. The default value isws://localhost:7078。要启动使用TLS的WebSocket一个服务器的安全连接,指定WSS:// <hostname>:<港口>。
If Yes is specified, either explicitly or through a parameter, the WebSocketReceiver verifies the certificate (or chain of certificates) of the WebSocket server before establishing a connection.
如果该可选参数具有值,那么将WebSocketReceiver处理任何输入数据之前发送此参数到远程的WebSocket服务器的内容。
To connect to the FME Server WebSocket server, use the following preamble:
{
"ws_op" : "open",
“ws_stream_ids”:[ “<流ID>”, “<流ID>”, “<流ID>”,...]
}
To specify this preamble, click the ellipsis (...) to open the Connection Preamble dialog. Under FME Server WebSocket Preambles, select the Open Public Stream template. Then, specify aws_stream_idsvalue.
ws_stream_ids识别一个或多个消息流,以便WebSocket的服务器将它们与正确的请求的应用程序相关联。
Specify the output attribute that will store the received WebSocket message data.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, clickbeside the applicable parameter. For more information, seeTransformer Parameter Menu Options。
Transformer Categories
FME许可级别
FME专业版及以上
Search FME Knowledge Center
Search for samples and information about this transformer on theFME知识中心。