이 콘텐츠는 선택한 언어로 제공되지 않습니다.

10.2. Basic configuration


Overview

The basic requirements for configuring a poller endpoint are straightforward. You need to supply the following information:
  • the endpoint's name
  • the endpoint's service name
  • the file or directory to be monitored
  • the endpoint to which the resulting messages will be sent
All of this information is provided using attributes of the poller element.

Identifying the endpoint

All endpoints need to have a unique identity. An endpoint's identity is made up of two pieces of information:
  • a service name
  • an endpoint name
Table 10.1, “Attributes for identifying a poller endpoint” describes the attributes used to identify a poller endpoint.
Expand
Table 10.1. Attributes for identifying a poller endpoint
NameDescription
service Specifies the service name of the endpoint. This value must be a valid QName and does not need to be unique.
endpoint Specifies the name of the endpoint. This value is a simple string. It must be unique among all of the endpoints associated with a given service name.

Specifying the message source

You specify the location in which the poller endpoint looks for new messages using the poller element's file attribute. This attribute takes a URI that identifies a location on the file system.
If you want the endpoint to poll a specific file, you use the standard file:location URI. If you do not use the file prefix, the endpoint will assume the URI specifies a directory on the file system and will consume all valid XML files placed in the specified directory.
For example, the URI file:inbox tells the endpoint to poll for a file called inbox. The URI inbox instructs the endpoint to poll the directory inbox.
Important
Relative URIs are resolved from the directory in which the Red Hat JBoss Fuse container was started.

Specifying the target endpoint

There are a number of attributes available for configuring the endpoint to which the generated messages are sent. The poller endpoint will determine the target endpoint in the following manner:
  1. If you explicitly specify an endpoint using both the targetService attribute and the targetEndpoint attribute, the ESB will use that endpoint.
    The targetService attribute specifies the QName of a service deployed into the ESB. The targetEndpoint attribute specifies the name of an endpoint deployed by the service specified by the targetService attribute.
  2. If you only specify a value for the targetService attribute, the NMR will attempt to find an appropriate endpoint on the specified service.
  3. If you do not specify a service name or an endpoint name, you must specify the name of an interface that can accept the message using the targetInterface attribute. The NMR will attempt to locate an endpoint that implements the specified interface and direct the messages to it.
    Interface names are specified as QNames. They correspond to the value of the name attribute of either a WSDL 1.1 serviceType element or a WSDL 2.0 interface element.
Important
If you specify values for more than one of the target attributes, the poller endpoint will use the most specific information.

Example

Example 10.1, “Simple poller endpoint” shows the configuration for a simple poller endpoint.

Example 10.1. Simple poller endpoint

<beans xmlns:file="http://servicemix.apache.org/file/1.0"
	       xmlns:foo="http://servicemix.org/demo/">

  <file:poller service="foo:filePoller"
               endpoint="filePoller"
               targetService="foo:fileSender" 
               file="file:inbox/test.xml" />
  ...
</beans>
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat