public final class NetworkConnectionServiceImpl extends Object implements NetworkConnectionService
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes all resources and unregisters all registered connection factories.
|
<T> ConnectionFactory<T> |
getConnectionFactory(Identifier connFactoryId)
Gets a ConnectionFactory.
|
<T> ConnectionFactory<T> |
registerConnectionFactory(Identifier connectionFactoryId,
Codec<T> codec,
EventHandler<Message<T>> eventHandler,
LinkListener<Message<T>> linkListener,
Identifier localEndPointId)
Registers an instance of ConnectionFactory corresponding to the connectionFactoryId.
|
void |
unregisterConnectionFactory(Identifier connFactoryId)
Unregisters a connectionFactory corresponding to the connectionFactoryId
and removes the localEndPointID of the connection factory from NameServer.
|
public <T> ConnectionFactory<T> registerConnectionFactory(Identifier connectionFactoryId, Codec<T> codec, EventHandler<Message<T>> eventHandler, LinkListener<Message<T>> linkListener, Identifier localEndPointId)
NetworkConnectionService
registerConnectionFactory
in interface NetworkConnectionService
connectionFactoryId
- a connection factory idcodec
- a codec for type TeventHandler
- an event handler for type TlinkListener
- a link listenerlocalEndPointId
- a local end point idpublic void unregisterConnectionFactory(Identifier connFactoryId)
NetworkConnectionService
unregisterConnectionFactory
in interface NetworkConnectionService
connFactoryId
- a connection factory idpublic <T> ConnectionFactory<T> getConnectionFactory(Identifier connFactoryId)
getConnectionFactory
in interface NetworkConnectionService
connFactoryId
- the identifier of the ConnectionFactorypublic void close() throws Exception
NetworkConnectionService
close
in interface AutoCloseable
close
in interface NetworkConnectionService
Exception
- if this resource cannot be closedCopyright © 2017 The Apache Software Foundation. All rights reserved.