RMI Component
The rmi: component bind the PojoExchanges to the RMI protocol (JRMP).
Since this binding is just using RMI, normal RMI rules still apply in regards to what the methods can be used over it. This component only supports PojoExchanges that carry a method invocation that is part of an interface that extends the Remote interface. All parameters in the method should be either Serializable or Remote objects too.
Code Block |
---|
rmi://rmi-regisitry-host:rmi-registry-port/registry-path
|
For example:
Code Block |
---|
rmi://localhost:1099/path/to/service
|
Using
To call out to an existing RMI service registered in an RMI registry, create a Route similar to:
Code Block |
---|
|
from("pojo:foo").to("rmi://localhost:1099/foo");
|
To bind an existing camel processor or service in an RMI registry, create a Route like:
Code Block |
---|
|
RmiEndpoint endpoint= (RmiEndpoint) endpoint("rmi://localhost:1099/bar");
endpoint.setRemoteInterfaces(ISay.class);
from(endpoint).to("pojo:bar");
|
Notice that when binding an inbound RMI endpoint, the Remote interfaces exposed must be specified.
Include Page |
---|
| CAMEL:Endpoint See Also |
---|
| CAMEL:Endpoint See Also |
---|
|