When creating an endpoint via Remoting.createEndpoint(), all the protocol transports that
exist on the classpath will be automatically installed into the endpoint. When creating
an endpoint via AS, the deployer system will be used instead, but the results are the same
- the protocols are installed automatically.
So essentially, if you remove the second and third lines from your first example, it
should just work, as long as the protocol exists on the classpath.
You can still install additional protocols manually via Endpoint.addConnectionProvider().
I do want a better solution for servers though. Problem is, there's really no truly
generic representation for servers. You can't just throw a SocketAddress and an
OptionMap at it, because (a) it might not even involve a socket, and (b) you may need more
information that can't be specified by an OptionMap (such as the Executor in your
example). Right now, if you are the one who registers the connection provider, you can
use the return value from that method to get an interface to control the server, though
the interface type is specific to the ConnectionProviderFactory. But if not (e.g. if the
provider was detected), you're S.O.L. Perhaps a method on Endpoint like this could
solve the problem:
T getProviderInterface(String uriScheme, Class<T> interfaceType)
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267137#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...