public SingleConnectionDetails get(Identifier id) { return services.get(id.toString()); }
@Override public void run() { this.setName("AppsLauncher_ThreadReader"); try { String line; while ((line = br.readLine()) != null) { buf.append(line); buf.append("\n"); } } catch (IOException ex) { // The App stream is closed! AppDetails details = manager.get(appObjId); Logger.getLogger(AppsLauncherProviderServiceImpl.class.getName()).log( Level.INFO, "The stream of the App " + appObjId + " (name: " + details.getName().toString() + ") has been closed."); close(); } } };
/** * Checks if the provided domain matches the supplied domain with a wildcard * * @param domain Domain * @param wilcardDomain Domain with wildcard * @return True if the domain matches the domain with the wildcard */ public static boolean domainMatchesWildcardDomain(IdentifierList domain, IdentifierList wilcardDomain) { // The domain of the wildcard can never be greater than the real domain if (wilcardDomain.size() > domain.size() + 1) { return false; } // cycle through the parts of the domains for (int i = 0; i < wilcardDomain.size(); i++) { Identifier domainPart1 = wilcardDomain.get(i); if ("*".equals(domainPart1.toString())) { return true; // Wildcard found! } Identifier domainPart2 = domain.get(i); // The parts are different, return false if (!domainPart1.toString().equals(domainPart2.toString())) { return false; } } return false; }
protected StatisticValue generateStatisticValue(Long statFuncId, long paramIdentityId, TimeList times, AttributeValueList values) { StatisticFunctionDetails statFunction = this.getStatisticFunction(statFuncId); if (statFunction == null) { return null; } //requirment: 3.6.2.b, c if (statFunction.getName().toString().equals(STR_STAT_FUNC_NAME_MAXIMUM)) { // Maximum return this.generateStatisticValueMaximum(paramIdentityId, times, values); } if (statFunction.getName().toString().equals(STR_STAT_FUNC_NAME_MINIMUM)) { // Minimum return this.generateStatisticValueMinimum(paramIdentityId, times, values); } if (statFunction.getName().toString().equals(STR_STAT_FUNC_NAME_MEAN_AVERAGE)) { // Mean average return this.generateStatisticValueMeanAverage(paramIdentityId, times, values); } if (statFunction.getName().toString().equals(STR_STAT_FUNC_NAME_STD_DEVIATION)) { // Standard deviation return this.generateStatisticValueStandardDeviation(paramIdentityId, times, values); } // Generate Statistic Value from external if (externalStatFunctions != null) { return externalStatFunctions.generateCustomStatisticValue(statFuncId, times, values); } return null; }
static public void getValuesFromEntityKey(EntityKey key, KeyParts keyParts) { // Get the area/service/version from the second sub key generateObjectTypeFromSubKey(keyParts.objectType, key.getSecondSubKey()); // Add object number from first subkey keyParts.objectType.setNumber( new UShort(Integer.parseInt(key.getFirstSubKey().toString()))); // Instance number is 3rd keyParts.objectInstance = key.getThirdSubKey(); // Source object is all from the 4th generateObjectTypeFromSubKey(keyParts.sourceObjectType, key.getFourthSubKey()); }
"Generating update for the App: {0} (Identifier: {1})", new Object[]{ appObjId, new Identifier(manager.get(appObjId).getName().toString()) }); final EntityKey ekey = new EntityKey(new Identifier(manager.get(appObjId).getName().toString()), appObjId, null, null); final Time timestamp = HelperTime.getTimestampMillis();
/** * 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"); }
archiveServiceProvider = connection.startService(ArchiveHelper.ARCHIVE_SERVICE_NAME.toString(), ArchiveHelper.ARCHIVE_SERVICE, false, this); running = true; initialiased = true;
/** * 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; }
alertServiceProvider = connection.startService(AlertHelper.ALERT_SERVICE_NAME.toString(), AlertHelper.ALERT_SERVICE, false, this);
for (Identifier alertName : alertNames) { // requirement: 3.4.9.2.f if (alertName.toString().equals("*")) { // requirement: 3.4.9.2.b
for (Identifier actionName : actionNames) { // requirement: 3.2.11.2.f if (actionName.toString().equals("*")) { // requirement: 3.2.11.2.b
eventServiceProvider = connection.startService(EventHelper.EVENT_SERVICE_NAME.toString(), EventHelper.EVENT_SERVICE, this); running = true; initialiased = true;
actionServiceProvider = connection.startService(ActionHelper.ACTION_SERVICE_NAME.toString(), ActionHelper.ACTION_SERVICE, false, this);
Identifier name = nameList.get(index); if (name.toString().equals("*")) {
/** * 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(); }
if (paramNames.get(i).toString().equals("*")) { // requirement: 3.3.11.2.b
parameterServiceProvider = connection.startService(ParameterHelper.PARAMETER_SERVICE_NAME.toString(), ParameterHelper.PARAMETER_SERVICE, this);
aggregationServiceProvider = connection.startService(AggregationHelper.AGGREGATION_SERVICE_NAME.toString(), AggregationHelper.AGGREGATION_SERVICE, this);
Identifier name = names.get(i); if (name.toString().equals("*")) {