public interface ChannelBuilder
ServiceLoader registry
(i.e. a file META-INF/services/org.granite.client.messaging.channel.ChannelBuilder)
The ChannelFactory will look for all registered channel builders and find the first one able to build the requested channel type.
A ChannelBuilder should return null for any of the interface methods it can't fulfill.| Modifier and Type | Method and Description |
|---|---|
MessagingChannel |
buildMessagingChannel(java.lang.String channelType,
java.lang.String id,
ServerApp serverApp,
Transport transport,
MessagingCodec<Message[]> codec)
Build a messaging channel with the specified server application
ServerApp |
MessagingChannel |
buildMessagingChannel(java.lang.String channelType,
java.lang.String id,
java.net.URI uri,
Transport transport,
MessagingCodec<Message[]> codec)
Build a messaging channel with the specified
URI |
RemotingChannel |
buildRemotingChannel(java.lang.Class<? extends RemotingChannel> channelClass,
java.lang.String id,
ServerApp serverApp,
int maxConcurrentRequests,
Transport transport,
MessagingCodec<AMF0Message> codec)
Build a remoting channel with the specified server application
ServerApp |
RemotingChannel |
buildRemotingChannel(java.lang.Class<? extends RemotingChannel> channelClass,
java.lang.String id,
java.net.URI uri,
int maxConcurrentRequests,
Transport transport,
MessagingCodec<AMF0Message> codec)
Build a remoting channel with the specified
URI |
RemotingChannel buildRemotingChannel(java.lang.Class<? extends RemotingChannel> channelClass, java.lang.String id, java.net.URI uri, int maxConcurrentRequests, Transport transport, MessagingCodec<AMF0Message> codec)
URIchannelClass - channel classid - channel iduri - channel urimaxConcurrentRequests - max concurrent requeststransport - transport for the channelcodec - codec to apply to the transmitted messagesRemotingChannel buildRemotingChannel(java.lang.Class<? extends RemotingChannel> channelClass, java.lang.String id, ServerApp serverApp, int maxConcurrentRequests, Transport transport, MessagingCodec<AMF0Message> codec)
ServerAppchannelClass - channel classid - channel idserverApp - server applicationmaxConcurrentRequests - max concurrent requeststransport - transport for the channelcodec - codec to apply to the transmitted messagesMessagingChannel buildMessagingChannel(java.lang.String channelType, java.lang.String id, java.net.URI uri, Transport transport, MessagingCodec<Message[]> codec)
URIchannelType - channel type ChannelTypeid - channel iduri - channel uritransport - transport for the channelcodec - codec to apply to the transmitted messagesMessagingChannel buildMessagingChannel(java.lang.String channelType, java.lang.String id, ServerApp serverApp, Transport transport, MessagingCodec<Message[]> codec)
ServerAppchannelType - channel type ChannelTypeid - channel idserverApp - server application definitiontransport - transport for the channelcodec - codec to apply to the transmitted messages