이 샘플에서 Camel은 포트 6200에서 TCP 연결을 수신 대기하는 서비스를 노출합니다. text line codec를 사용합니다. 이 경로에서 포트 6200에서 수신 대기하는 Mina 소비자 끝점을 생성합니다.
from("mina2:tcp://localhost:" + port1 + "?textline=true&sync=false").to("mock:result");
from("mina2:tcp://localhost:" + port1 + "?textline=true&sync=false").to("mock:result");
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedBodiesReceived("Hello World");
template.sendBody("mina2:tcp://localhost:" + port1 + "?textline=true&sync=false", "Hello World");
assertMockEndpointsSatisfied();
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedBodiesReceived("Hello World");
template.sendBody("mina2:tcp://localhost:" + port1 + "?textline=true&sync=false", "Hello World");
assertMockEndpointsSatisfied();
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow