public DevVarLongStringArray subscribe ( final String deviceName ) throws DevFailed { xlogger . entry ( ) ; // If first time start the ZMQ management if ( ! isInitialized ) { initialize ( ) ; } // check if event is already subscribed final String fullName = EventUtilities . buildDeviceEventName ( deviceName , EventType . INTERFACE_CHANGE_EVENT ) ; EventImpl eventImpl = eventImplMap . get ( fullName ) ; if ( eventImpl == null ) { // If not already manage, create EventImpl object and add it to the map eventImpl = new EventImpl ( DeviceImpl . SERVER_VERSION , fullName ) ; eventImplMap . put ( fullName , eventImpl ) ; } else { eventImpl . updateSubscribeTime ( ) ; } return buildConnectionParameters ( fullName ) ; }
Initialize ZMQ event system if not already done subscribe to the interface change event end returns the connection parameters .