public static String getClassName(Class<?> clazz) { if (Map.class.isAssignableFrom(clazz) && !Externalizable.class.isAssignableFrom(clazz)) { Externalizer externalizer = ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(clazz.getName()); if (externalizer == null) return ""; } return ((AliasRegistryConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getAliasRegistry().getAliasForType(clazz.getName()); }
public static String getClassName(Class<?> clazz) { if (Map.class.isAssignableFrom(clazz) && !Externalizable.class.isAssignableFrom(clazz)) { Externalizer externalizer = ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(clazz.getName()); if (externalizer == null) return ""; } return ((AliasRegistryConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getAliasRegistry().getAliasForType(clazz.getName()); }
public static String getClassName(Class<?> clazz) { if (Map.class.isAssignableFrom(clazz) && !Externalizable.class.isAssignableFrom(clazz)) { Externalizer externalizer = GraniteContext.getCurrentInstance().getGraniteConfig().getExternalizer(clazz.getName()); if (externalizer == null) return ""; } return GraniteContext.getCurrentInstance().getGraniteConfig().getAliasRegistry().getAliasForType(clazz.getName()); }
private Externalizer findExternalizer() { if (encoding != 0x01) return null; return ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(type); }
/** * Constructor * * @param outputStream */ public AMF0Serializer(OutputStream outputStream) { AMF3Config config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.dataOutput = config.newAMF3Serializer(outputStream); }
/** * Constructor * * @param outputStream */ public AMF0Serializer(OutputStream outputStream) { AMF3Config config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.dataOutput = config.newAMF3Serializer(outputStream); }
private Externalizer findExternalizer() { if (encoding != 0x01) return null; return ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(type); }
private Externalizer findExternalizer() { if (encoding != 0x01) return null; return ((ExternalizersConfig)GraniteContext.getCurrentInstance().getGraniteConfig()).getExternalizer(type); }
private void writeAMF3Data(AMF3Object data) throws IOException { dataOutputStream.writeByte(AMF0Body.DATA_TYPE_AMF3_OBJECT); ObjectOutput amf3 = GraniteContext.getCurrentInstance().getGraniteConfig().newAMF3Serializer(rawOutputStream); amf3.writeObject(data.getValue()); }
/** * Constructor * * @param outputStream */ public AMF0Serializer(OutputStream outputStream) { AMF3Config config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.dataOutput = config.newAMF3Serializer(outputStream); }
private Externalizer findExternalizer() { if (encoding != 0x01) return null; return GraniteContext.getCurrentInstance().getGraniteConfig().getExternalizer(type); }
protected JavaClassDescriptor(Class<?> type) { Object config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = type; this.name = getClassName(type); this.externalizer = ((ExternalizersConfig)config).getExternalizer(type.getName()); this.converters = ((ConvertersConfig)config).getConverters(); this.encoding = findEncoding(type); List<Property> properties = introspectProperties(); this.properties = (properties != null ? properties.toArray(new Property[0]) : new Property[0]); }
protected JavaClassDescriptor(Class<?> type) { Object config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = type; this.name = getClassName(type); this.externalizer = ((ExternalizersConfig)config).getExternalizer(type.getName()); this.converters = ((ConvertersConfig)config).getConverters(); this.encoding = findEncoding(type); List<Property> properties = introspectProperties(); this.properties = (properties != null ? properties.toArray(new Property[0]) : new Property[0]); }
protected JavaClassDescriptor(Class<?> type) { Object config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = type; this.name = getClassName(type); this.externalizer = ((ExternalizersConfig)config).getExternalizer(type.getName()); this.converters = ((ConvertersConfig)config).getConverters(); this.encoding = findEncoding(type); List<Property> properties = introspectProperties(); this.properties = (properties != null ? properties.toArray(new Property[0]) : new Property[0]); }
protected ActionScriptClassDescriptor(String type, byte encoding) { Object config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = (type == null ? "" : ((AliasRegistryConfig)config).getAliasRegistry().getTypeForAlias(type)); this.instantiator = ((ExternalizersConfig)config).getInstantiator(type); this.encoding = encoding; this.externalizer = findExternalizer(); this.converters = ((ConvertersConfig)config).getConverters(); this.properties = new ArrayList<Property>(); }
protected ActionScriptClassDescriptor(String type, byte encoding) { Object config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = (type == null ? "" : ((AliasRegistryConfig)config).getAliasRegistry().getTypeForAlias(type)); this.instantiator = ((ExternalizersConfig)config).getInstantiator(type); this.encoding = encoding; this.externalizer = findExternalizer(); this.converters = ((ConvertersConfig)config).getConverters(); this.properties = new ArrayList<Property>(); }
protected ActionScriptClassDescriptor(String type, byte encoding) { Object config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = (type == null ? "" : ((AliasRegistryConfig)config).getAliasRegistry().getTypeForAlias(type)); this.instantiator = ((ExternalizersConfig)config).getInstantiator(type); this.encoding = encoding; this.externalizer = findExternalizer(); this.converters = ((ConvertersConfig)config).getConverters(); this.properties = new ArrayList<Property>(); }
protected JavaClassDescriptor(Class<?> type) { GraniteConfig config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = type; this.name = getClassName(type); this.externalizer = config.getExternalizer(type.getName()); this.converters = config.getConverters(); this.encoding = findEncoding(type); this.properties = introspectProperties(); }
protected ActionScriptClassDescriptor(String type, byte encoding) { GraniteConfig config = GraniteContext.getCurrentInstance().getGraniteConfig(); this.type = (type == null ? "" : config.getAliasRegistry().getTypeForAlias(type)); this.instantiator = config.getInstantiator(type); this.encoding = encoding; this.externalizer = findExternalizer(); this.converters = config.getConverters(); this.properties = new ArrayList<Property>(); }
public void subscribe(String selector, String destination, String topic) throws Exception { GraniteConfig graniteConfig = GraniteContext.getCurrentInstance().getGraniteConfig(); DistributedDataFactory distributedDataFactory = graniteConfig.getDistributedDataFactory(); String subscriptionId = distributedDataFactory.getInstance().getDestinationSubscriptionId(destination); if (subscriptionId != null) internalSubscribe(subscriptionId, selector, destination, topic); }