@Override public ClientType getClientType() { return config.getClientType(); }
public Class<? extends ActionScriptClassDescriptor> getActionScriptDescriptor(String type) { return getElementByType(type, ASC_DESCRIPTOR_FACTORY, as3DescriptorsByType, as3DescriptorsByInstanceOf, null, null); }
public Configuration newConfiguration() { return new SimpleConfiguration(); }
private void forElement(XMap element, boolean custom, String graniteConfigProperties) { String scan = element.get("@scan"); this.scan = Boolean.TRUE.toString().equals(scan); loadCustomAMF3Serializer(element, custom); loadCustomConverters(element, custom); loadCustomInstantiators(element, custom); loadCustomClassGetter(element, custom); loadCustomExternalizers(element, custom); loadCustomDescriptors(element, custom); if (this.scan) scanConfig(graniteConfigProperties); finishCustomConverters(custom); }
/** * Create an AMF channel factory with the specified configuration and transports and for the specified platform context * Custom configuration can extend the default SimpleConfiguration * @param context platform context * @param remotingTransport remoting transport * @param messagingTransport messaging transport * @param defaultConfiguration configuration * @see org.granite.client.configuration.SimpleConfiguration */ public AMFChannelFactory(Object context, Transport remotingTransport, Transport messagingTransport, Configuration defaultConfiguration) { super(ContentType.AMF, context, remotingTransport, messagingTransport); this.defaultConfiguration = (defaultConfiguration != null ? defaultConfiguration : Platform.getInstance().newConfiguration()); if (!this.defaultConfiguration.isLoaded()) this.defaultConfiguration.load(); this.aliasRegistry = ((AliasRegistryConfig)this.defaultConfiguration.getGraniteConfig()).getAliasRegistry(); }
public void load() { InputStream is = null; try { is = Thread.currentThread().getContextClassLoader().getResourceAsStream(graniteStdConfigPath); if (graniteConfigPath != null) is = Thread.currentThread().getContextClassLoader().getResourceAsStream(graniteConfigPath); graniteConfig = new ClientGraniteConfig(graniteStdConfigPath, is, null, null); postLoad(graniteConfig); servicesConfig = new ClientServicesConfig(); } catch (Exception e) { graniteConfig = null; servicesConfig = null; throw new RuntimeException("Cannot load configuration", e); } finally { if (is != null) try { is.close(); } catch (IOException e) { } } }
public AMFChannelFactory(Object context, Transport remotingTransport, Transport messagingTransport, Configuration defaultConfiguration) { super(ContentType.AMF, context, remotingTransport, messagingTransport); this.defaultConfiguration = (defaultConfiguration != null ? defaultConfiguration : Platform.getInstance().newConfiguration()); this.aliasRegistry = this.defaultConfiguration.getGraniteConfig().getAliasRegistry(); }
public boolean handleMarkerItem(ScannedItem item) { try { return handleProperties(item.loadAsProperties()); } catch (Exception e) { log.error(e, "Could not load properties: %s", item); } return true; }
@Override public void postLoad(ClientGraniteConfig graniteConfig) { ClientAliasRegistry aliasRegistry = new ClientAliasRegistry(); aliasRegistry.registerAlias(PersistentSet.class.getName(), "org.granite.messaging.persistence.ExternalizablePersistentSet"); aliasRegistry.registerAlias(PersistentBag.class.getName(), "org.granite.messaging.persistence.ExternalizablePersistentBag"); aliasRegistry.registerAlias(PersistentList.class.getName(), "org.granite.messaging.persistence.ExternalizablePersistentList"); aliasRegistry.registerAlias(PersistentMap.class.getName(), "org.granite.messaging.persistence.ExternalizablePersistentMap"); aliasRegistry.registerAlias("org.granite.client.validation.InvalidValue", "org.granite.tide.validators.InvalidValue"); graniteConfig.setAliasRegistry(aliasRegistry); } }
/** * Create an AMF channel factory with the specified configuration and transports and for the specified platform context * Custom configuration can extend the default SimpleConfiguration * @param context platform context * @param remotingTransport remoting transport * @param messagingTransport messaging transport * @param defaultConfiguration configuration * @see org.granite.client.configuration.SimpleConfiguration */ public AMFChannelFactory(Object context, Transport remotingTransport, Transport messagingTransport, Configuration defaultConfiguration) { super(ContentType.AMF, context, remotingTransport, messagingTransport); this.defaultConfiguration = (defaultConfiguration != null ? defaultConfiguration : Platform.getInstance().newConfiguration()); if (!this.defaultConfiguration.isLoaded()) this.defaultConfiguration.load(); this.aliasRegistry = ((AliasRegistryConfig)this.defaultConfiguration.getGraniteConfig()).getAliasRegistry(); }
public void load() { InputStream is = null; try { is = Thread.currentThread().getContextClassLoader().getResourceAsStream(graniteStdConfigPath); if (graniteConfigPath != null) is = Thread.currentThread().getContextClassLoader().getResourceAsStream(graniteConfigPath); graniteConfig = new ClientGraniteConfig(graniteStdConfigPath, is, null, null); postLoad(graniteConfig); servicesConfig = new ClientServicesConfig(); } catch (Exception e) { graniteConfig = null; servicesConfig = null; throw new RuntimeException("Cannot load configuration", e); } finally { if (is != null) try { is.close(); } catch (IOException e) { } } }
@Override public ClientType getClientType() { return config.getClientType(); }
public Class<? extends ActionScriptClassDescriptor> getActionScriptDescriptor(String type) { return getElementByType(type, ASC_DESCRIPTOR_FACTORY, as3DescriptorsByType, as3DescriptorsByInstanceOf, null, null); }
public boolean handleMarkerItem(ScannedItem item) { try { return handleProperties(item.loadAsProperties()); } catch (Exception e) { log.error(e, "Could not load properties: %s", item); } return true; }
@Override public ClientType getClientType() { return config.getClientType(); }
public Class<? extends JavaClassDescriptor> getJavaDescriptor(String type) { return getElementByType(type, JC_DESCRIPTOR_FACTORY, javaDescriptorsByType, javaDescriptorsByInstanceOf, null, null); }
@Override public ClientType getClientType() { return config.getClientType(); }
public Class<? extends JavaClassDescriptor> getJavaDescriptor(String type) { return getElementByType(type, JC_DESCRIPTOR_FACTORY, javaDescriptorsByType, javaDescriptorsByInstanceOf, null, null); }
@Override public ClientType getClientType() { return config.getClientType(); }
@Override public ClientType getClientType() { return config.getClientType(); }