private static <Msg,Rec> void startClientMessengers(BundleContext context, Properties groupProps, String connectionId, String commandDestId, String commandSenderId, String configDestId, String configSenderId, Adapter<Msg,Rec> configMsgRecAdapter, Class<Msg> msgClass, Class<Rec> recClass, String errorDestId, String errorReceiverId){ JMSAvroMessageSenderLifecycle commandSender = new JMSAvroMessageSenderLifecycle( new EmptyAdapter(), ServiceCommand.class, ServiceCommandRecord.class, commandSenderId, connectionId, commandDestId); new OSGiComponent(context, commandSender, groupProps).start(); JMSAvroMessageSenderLifecycle configSender = new JMSAvroMessageSenderLifecycle( configMsgRecAdapter, msgClass, recClass, configSenderId, connectionId, configDestId); new OSGiComponent(context, configSender, groupProps).start(); JMSAvroAsyncReceiverLifecycle errorReceiver = new JMSAvroAsyncReceiverLifecycle( new EmptyAdapter(), ServiceError.class, ServiceErrorRecord.class, ServiceErrorRecord.SCHEMA$, errorReceiverId, connectionId, errorDestId); new OSGiComponent(context, errorReceiver, groupProps).start(); }
private void launchRemotePlayer(BundleContext context, String playerId, String receiverId, String senderId, String conId, String destId){ JMSAvroMessageSenderLifecycle signalLife = new JMSAvroMessageSenderLifecycle( new PortableAnimationSignal.MessageRecordAdapter(), AnimationSignal.class, AnimationSignallingRecord.class, senderId, CONNECTION_ID, SIGNAL_DEST_ID); ManagedService myAnimationSenderService = new OSGiComponent(context, signalLife); myAnimationSenderService.start(); theLogger.info("Launching Dynamic RemoteAnimationPlayerHost Service."); new OSGiComponent(context, new AnimationPlayerHostLifecycle(playerId, receiverId, senderId) ).start(); JMSAvroAsyncReceiverLifecycle reqRecLifecycle = new JMSAvroAsyncReceiverLifecycle( new PortableAnimationEvent.RecordMessageAdapter(), AnimationEvent.class, AnimationEventRecord.class, AnimationEventRecord.SCHEMA$, ANIM_RECEIVER_ID, conId, destId); OSGiComponent reqRec = new OSGiComponent(context, reqRecLifecycle); reqRec.start(); theLogger.info("Dynamic RemoteAnimationPlayerHost Service Launched."); }
new JMSAvroMessageSenderLifecycle( new PortableRobotRequest.MessageRecordAdapter(), RobotRequest.class, RobotRequestRecord.class, new JMSAvroMessageSenderLifecycle( new PortableMotionFrameEvent.MessageRecordAdapter(), MotionFrameEvent.class, MotionFrameEventRecord.class,
private void launchRemotePlayer(BundleContext context, String playerId, String receiverId, String senderId, String conId, String destId){ JMSAvroMessageSenderLifecycle signalLife = new JMSAvroMessageSenderLifecycle( new PortableAnimationSignal.MessageRecordAdapter(), AnimationSignal.class, AnimationSignallingRecord.class, senderId, CONNECTION_ID, SIGNAL_DEST_ID); ManagedService myAnimationSenderService = new OSGiComponent(context, signalLife); myAnimationSenderService.start(); theLogger.info("Launching Dynamic RemoteAnimationPlayerHost Service."); new OSGiComponent(context, new AnimationPlayerHostLifecycle(playerId, receiverId, senderId) ).start(); JMSAvroAsyncReceiverLifecycle reqRecLifecycle = new JMSAvroAsyncReceiverLifecycle( new PortableAnimationEvent.RecordMessageAdapter(), AnimationEvent.class, AnimationEventRecord.class, AnimationEventRecord.SCHEMA$, ANIM_RECEIVER_ID, conId, destId); OSGiComponent reqRec = new OSGiComponent(context, reqRecLifecycle); reqRec.start(); theLogger.info("Dynamic RemoteAnimationPlayerHost Service Launched."); }
private static void startSpeechMessengers(BundleContext context, Properties groupProps, String connectionId, String speechReqDestId, String speechRequestSenderId, String speechEventsDestId, String speechEventsReceiverId){ JMSAvroMessageSenderLifecycle speechRequestSender = new JMSAvroMessageSenderLifecycle( new EmptyAdapter(), SpeechRequest.class, SpeechRequestRecord.class, speechRequestSenderId, connectionId, speechReqDestId); new OSGiComponent(context, speechRequestSender, groupProps).start(); JMSAvroAsyncReceiverLifecycle speechEventsReceiver = new JMSAvroAsyncReceiverLifecycle( new EmptyAdapter(), SpeechEventList.class, SpeechEventListRecord.class, SpeechEventListRecord.SCHEMA$, speechEventsReceiverId, connectionId, speechEventsDestId); new OSGiComponent(context, speechEventsReceiver, groupProps).start(); }
"remoteAnimationRequest", "animationRequest", ConnectionUtils.TOPIC, null); JMSAvroMessageSenderLifecycle senderLife = new JMSAvroMessageSenderLifecycle( new PortableAnimationEvent.MessageRecordAdapter(), AnimationEvent.class, AnimationRecord.class,