/** * Finds a COMService from the fields area, areaVersion and serviceNumber * * @param area Area of the service * @param areaVersion Area version * @param serviceNumber Service number * @return COMService */ public static COMService findCOMService(UShort area, UOctet areaVersion, UShort serviceNumber) { return (COMService) MALContextFactory.lookupArea( area, areaVersion ).getServiceByNumber(serviceNumber); }
public ConversionConsumerServiceImpl() { try { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(MCHelper.MC_AREA_NAME, MCHelper.MC_AREA_VERSION) == null) { MCHelper.init(MALContextFactory.getElementFactoryRegistry()); } try { ConversionHelper.init(MALContextFactory.getElementFactoryRegistry()); } catch (MALException ex) { // nothing to be done.. } } catch (MALException ex) { Logger.getLogger(ConversionConsumerServiceImpl.class.getName()).log(Level.SEVERE, null, ex); } }
public GroupConsumerServiceImpl() throws MALException { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(MCHelper.MC_AREA_NAME, MCHelper.MC_AREA_VERSION) == null) { MCHelper.init(MALContextFactory.getElementFactoryRegistry()); } try { GroupHelper.init(MALContextFactory.getElementFactoryRegistry()); } catch (MALException ex) { // nothing to be done.. } } }
/** * Initializes the service * * @param archiveService Archive service provider * @param eventService Event service provider * @throws MALException On initialization error. */ public synchronized void init(ArchiveProviderServiceImpl archiveService, EventProviderServiceImpl eventService) throws MALException { if (!initialiased) { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); } try { ActivityTrackingHelper.init(MALContextFactory.getElementFactoryRegistry()); } catch (MALException ex) { } } this.archiveService = archiveService; this.eventService = eventService; running = true; initialiased = true; Logger.getLogger(ActivityTrackingProviderServiceImpl.class.getName()).info("Activity Tracking service READY"); }
/** * * @param archiveService * @throws org.ccsds.moims.mo.mal.MALException */ protected synchronized void init(ArchiveProviderServiceImpl archiveService) throws MALException { this.archiveService = archiveService; if (!initialiased) { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.deepInit(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(MCHelper.MC_AREA_NAME, MCHelper.MC_AREA_VERSION) == null) { MCHelper.init(MALContextFactory.getElementFactoryRegistry()); } try { ConversionHelper.init(MALContextFactory.getElementFactoryRegistry()); } catch (MALException ex) { // nothing to be done.. } } initialiased = true; }
/** * * @param archiveService * @throws org.ccsds.moims.mo.mal.MALException */ protected synchronized void init(ArchiveProviderServiceImpl archiveService) throws MALException { this.archiveService = archiveService; if (!initialiased) { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.deepInit(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(MCHelper.MC_AREA_NAME, MCHelper.MC_AREA_VERSION) == null) { MCHelper.init(MALContextFactory.getElementFactoryRegistry()); } try { GroupHelper.init(MALContextFactory.getElementFactoryRegistry()); } catch (MALException ex) { // nothing to be done.. } } initialiased = true; }
/** * creates the MAL objects, the publisher used to create updates and starts * the publishing thread * * @param manager the Archive Manager * @throws MALException if initialization error. */ public synchronized void init(ArchiveManager manager) throws MALException { if (!initialiased) { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); } try { ArchiveSyncHelper.init(MALContextFactory.getElementFactoryRegistry()); } catch (MALException ex) { } } this.manager = manager; // shut down old service transport if (null != archiveSyncServiceProvider) { connection.closeAll(); } archiveSyncServiceProvider = connection.startService(ArchiveSyncHelper.ARCHIVESYNC_SERVICE_NAME.toString(), ArchiveSyncHelper.ARCHIVESYNC_SERVICE, false, this); running = true; initialiased = true; Logger.getLogger(ArchiveSyncProviderServiceImpl.class.getName()).info("ArchiveSync service READY"); }
public HeartbeatConsumerServiceImpl(SingleConnectionDetails connectionDetails, COMServicesConsumer comServices) throws MALException, MalformedURLException, MALInteractionException { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(SoftwareManagementHelper.SOFTWAREMANAGEMENT_AREA_NAME, SoftwareManagementHelper.SOFTWAREMANAGEMENT_AREA_VERSION) == null) { SoftwareManagementHelper.init(MALContextFactory.getElementFactoryRegistry());
public CheckConsumerServiceImpl(SingleConnectionDetails connectionDetails, COMServicesConsumer comServices) throws MALException, MalformedURLException, MALInteractionException { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(MCHelper.MC_AREA_NAME, MCHelper.MC_AREA_VERSION) == null) { MCHelper.init(MALContextFactory.getElementFactoryRegistry());
public AggregationConsumerServiceImpl(SingleConnectionDetails connectionDetails, COMServicesConsumer comServices) throws MALException, MalformedURLException, MALInteractionException { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(MCHelper.MC_AREA_NAME, MCHelper.MC_AREA_VERSION) == null) { MCHelper.init(MALContextFactory.getElementFactoryRegistry());
public AlertConsumerServiceImpl(SingleConnectionDetails connectionDetails, COMServicesConsumer comServices) throws MALException, MalformedURLException, MALInteractionException { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(MCHelper.MC_AREA_NAME, MCHelper.MC_AREA_VERSION) == null) { MCHelper.init(MALContextFactory.getElementFactoryRegistry());
public AppsLauncherConsumerServiceImpl(final SingleConnectionDetails connectionDetails, final COMServicesConsumer comServices) throws MALException, MalformedURLException, MALInteractionException { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(SoftwareManagementHelper.SOFTWAREMANAGEMENT_AREA_NAME, SoftwareManagementHelper.SOFTWAREMANAGEMENT_AREA_VERSION) == null) { SoftwareManagementHelper.init(MALContextFactory.getElementFactoryRegistry());
if (!initialiased) { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(MCHelper.MC_AREA_NAME, MCHelper.MC_AREA_VERSION) == null) { MCHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry());
if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry());
public ArchiveConsumerServiceImpl(SingleConnectionDetails connectionDetails) throws MALException, MalformedURLException { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); } try { ArchiveHelper.init(MALContextFactory.getElementFactoryRegistry()); } catch (MALException ex) { } this.connectionDetails = connectionDetails; // Close old connection if (tmConsumer != null) { try { tmConsumer.close(); } catch (MALException ex) { Logger.getLogger(ArchiveConsumerServiceImpl.class.getName()).log(Level.SEVERE, null, ex); } } tmConsumer = connection.startService( this.connectionDetails.getProviderURI(), this.connectionDetails.getBrokerURI(), this.connectionDetails.getDomain(), ArchiveHelper.ARCHIVE_SERVICE); this.archiveService = new ArchiveStub(tmConsumer); }
public ArchiveSyncConsumerServiceImpl(SingleConnectionDetails connectionDetails) throws MALException, MalformedURLException { if (MALContextFactory.lookupArea(MALHelper.MAL_AREA_NAME, MALHelper.MAL_AREA_VERSION) == null) { MALHelper.init(MALContextFactory.getElementFactoryRegistry()); } if (MALContextFactory.lookupArea(COMHelper.COM_AREA_NAME, COMHelper.COM_AREA_VERSION) == null) { COMHelper.init(MALContextFactory.getElementFactoryRegistry()); } try { ArchiveSyncHelper.init(MALContextFactory.getElementFactoryRegistry()); } catch (MALException ex) { } this.connectionDetails = connectionDetails; // Close old connection if (tmConsumer != null) { try { tmConsumer.close(); } catch (MALException ex) { Logger.getLogger(ArchiveSyncConsumerServiceImpl.class.getName()).log(Level.SEVERE, null, ex); } } tmConsumer = connection.startService( this.connectionDetails.getProviderURI(), this.connectionDetails.getBrokerURI(), this.connectionDetails.getDomain(), ArchiveSyncHelper.ARCHIVESYNC_SERVICE); this.archiveSyncService = new ArchiveSyncStub(tmConsumer); }
/** * Returns the Name of the COM object from the objectType * * @param objType Object Type * @return Name of the COM object */ public static String objType2string(final ObjectType objType) { final COMObject comObject = HelperCOM.objType2COMObject(objType); String string = MALContextFactory.lookupArea( objType.getArea(), objType.getAreaVersion() ).getName().toString(); string += " - " + MALContextFactory.lookupArea( objType.getArea(), objType.getAreaVersion() ).getServiceByNumber(objType.getService()).getName().toString(); if (comObject != null) { string += ": " + comObject.getObjectName().getValue(); } return string; }
/** * Finds and generates the COMObject from the ObjectType * * @param objType COM Object Type * @return COMObject object */ public static COMObject objType2COMObject(ObjectType objType) { if (objType == null) { return null; } if (objType.getService() == null) { return null; } COMService service = (COMService) MALContextFactory.lookupArea( objType.getArea(), objType.getAreaVersion() ).getServiceByNumber(objType.getService()); if (service == null || objType.getNumber().getValue() == 0) { // Special case for the event service... return null; } else { return service.getObjectByNumber(objType.getNumber()); } }
/** * Finds the service name from the area, areaVersion and service numbers * * @param area Area of the service * @param areaVersion Area version of the service * @param service Service number * @return The name of the service * @throws org.ccsds.moims.mo.mal.MALException The area/service is Unknown */ public static String serviceKey2name(UShort area, UOctet areaVersion, UShort service) throws MALException { MALArea malArea = MALContextFactory.lookupArea(area, areaVersion); if (malArea == null) { throw new MALException("(" + area.getValue() + "," + areaVersion.getValue() + "," + service.getValue() + ") " + "Unknown area to the MAL! Maybe the API was not initialized."); } MALService malSer = malArea.getServiceByNumber(service); if (malSer == null) { throw new MALException("(" + area.getValue() + "," + areaVersion.getValue() + "," + service.getValue() + ") " + "Unknown service to the MAL! Maybe the API was not initialized."); } return malSer.getName().toString(); }
BaseInteractionImpl(final MessageSend sender, final Address address, final MALMessage msg) throws MALInteractionException { this.sender = sender; this.address = address; this.msg = msg; this.operation = MALContextFactory.lookupArea(msg.getHeader().getServiceArea(), msg.getHeader().getAreaVersion()) .getServiceByNumber(msg.getHeader().getService()) .getOperationByNumber(msg.getHeader().getOperation()); if (null == this.operation) { throw new MALInteractionException(new MALStandardError(MALHelper.UNSUPPORTED_OPERATION_ERROR_NUMBER, new Union(msg.getHeader().getServiceArea() + "::" + msg.getHeader().getService() + "::" + msg.getHeader().getOperation()))); } }