Package io.joynr.messaging
Class MessagingSkeletonFactory
- java.lang.Object
-
- io.joynr.messaging.MessagingSkeletonFactory
-
- All Implemented Interfaces:
ShutdownListener
public class MessagingSkeletonFactory extends Object implements ShutdownListener
-
-
Field Summary
Fields Modifier and Type Field Description static StringMIDDLEWARE_MESSAGING_SKELETON_FACTORIES
-
Constructor Summary
Constructors Constructor Description MessagingSkeletonFactory(Map<Class<? extends Address>,IMessagingSkeletonFactory> messagingSkeletonFactories, ScheduledExecutorService scheduler, ShutdownNotifier shutdownNotifier)Transport Middleware implementation may be registered for use with a given Address type using guice multibinders.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<IMessagingSkeleton>getSkeleton(Address address)voidshutdown()voidstart()
-
-
-
Field Detail
-
MIDDLEWARE_MESSAGING_SKELETON_FACTORIES
public static final String MIDDLEWARE_MESSAGING_SKELETON_FACTORIES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MessagingSkeletonFactory
@Inject public MessagingSkeletonFactory(Map<Class<? extends Address>,IMessagingSkeletonFactory> messagingSkeletonFactories, ScheduledExecutorService scheduler, ShutdownNotifier shutdownNotifier)
Transport Middleware implementation may be registered for use with a given Address type using guice multibinders.messagingSkeletonFactory = MapBinder.newMapBinder(binder(), new TypeLiteral<Class<? extends Address>>() {}, new TypeLiteral<IMessagingSkeleton>(){}, Names.named(MessagingSkeletonFactory.MIDDLEWARE_MESSAGING_SKELETONS)); messagingSkeletonFactory.addBinding(InProcessAddress.class).to(InProcessMessagingSkeletonFactory.class);- Parameters:
messagingSkeletonFactories- a map of all skeletons (message receivers) that are to be startedscheduler- ExecutorService that schedules all messaging communicationshutdownNotifier- ShutdownNotifier
-
-
Method Detail
-
start
public void start()
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceShutdownListener
-
getSkeleton
public Optional<IMessagingSkeleton> getSkeleton(Address address)
-
-