public String getChannelId() { Message message = getRequest(); if (message != null) { Object id = message.getHeader(Message.ENDPOINT_HEADER); if (id instanceof String) return (String)id; } return null; }
protected Channel getChannel() { if (channel == null) { String channelId = context.getAMFContext().getChannelId(); if (channelId != null) channel = context.getServicesConfig().findChannelById(channelId); if (channel == null) log.debug("Could not get channel for channel id: %s", channelId); } return channel; } }
public AMF3Serializer(OutputStream out, int capacity) { this.out = out; this.buffer = new byte[capacity]; this.position = 0; this.storedStrings = new StringIndexedCache(); this.storedObjects = new ObjectIndexedCache(); this.storedClassDescriptors = new IdentityHashMap<Class<?>, IndexedJavaClassDescriptor>(); this.writersCache = new IdentityHashMap<Class<?>, AMF3Writer>(64); GraniteContext context = GraniteContext.getCurrentInstance(); ConvertersConfig convertersConfig = (ConvertersConfig)context.getGraniteConfig(); this.converters = convertersConfig.getConverters(); this.classGetter = convertersConfig.getClassGetter(); this.xmlUtil = XMLUtilFactory.getXMLUtil(); this.externalizersConfig = (ExternalizersConfig)context.getGraniteConfig(); this.externalizeLong = (externalizersConfig.getExternalizer(Long.class.getName()) != null); this.externalizeBigInteger = (externalizersConfig.getExternalizer(BigInteger.class.getName()) != null); this.externalizeBigDecimal = (externalizersConfig.getExternalizer(BigDecimal.class.getName()) != null); String channelId = context.getAMFContext().getChannelId(); ChannelConfig channelConfig = context.getServicesConfig(); this.legacyXmlSerialization = getChannelProperty(channelId, channelConfig, "legacyXmlSerialization"); this.legacyCollectionSerialization = getChannelProperty(channelId, channelConfig, "legacyCollectionSerialization"); }
public String getChannelId() { Message message = getRequest(); if (message != null) { Object id = message.getHeader(Message.ENDPOINT_HEADER); if (id instanceof String) return (String)id; } return null; }
public AMF3Serializer(OutputStream out, int capacity) { this.out = out; this.buffer = new byte[capacity]; this.position = 0; this.storedStrings = new StringIndexedCache(); this.storedObjects = new ObjectIndexedCache(); this.storedClassDescriptors = new IdentityHashMap<Class<?>, IndexedJavaClassDescriptor>(); this.writersCache = new IdentityHashMap<Class<?>, AMF3Writer>(64); GraniteContext context = GraniteContext.getCurrentInstance(); ConvertersConfig convertersConfig = (ConvertersConfig)context.getGraniteConfig(); this.converters = convertersConfig.getConverters(); this.classGetter = convertersConfig.getClassGetter(); this.xmlUtil = XMLUtilFactory.getXMLUtil(); this.externalizersConfig = (ExternalizersConfig)context.getGraniteConfig(); this.externalizeLong = (externalizersConfig.getExternalizer(Long.class.getName()) != null); this.externalizeBigInteger = (externalizersConfig.getExternalizer(BigInteger.class.getName()) != null); this.externalizeBigDecimal = (externalizersConfig.getExternalizer(BigDecimal.class.getName()) != null); String channelId = context.getAMFContext().getChannelId(); ChannelConfig channelConfig = context.getServicesConfig(); this.legacyXmlSerialization = getChannelProperty(channelId, channelConfig, "legacyXmlSerialization"); this.legacyCollectionSerialization = getChannelProperty(channelId, channelConfig, "legacyCollectionSerialization"); }
public String getChannelId() { Message message = getRequest(); if (message != null) { Object id = message.getHeader(Message.ENDPOINT_HEADER); if (id instanceof String) return (String)id; } return null; }
public AMF3Serializer(OutputStream out, int capacity) { this.out = out; this.buffer = new byte[capacity]; this.position = 0; this.storedStrings = new StringIndexedCache(); this.storedObjects = new ObjectIndexedCache(); this.storedClassDescriptors = new IdentityHashMap<Class<?>, IndexedJavaClassDescriptor>(); this.writersCache = new IdentityHashMap<Class<?>, AMF3Writer>(64); GraniteContext context = GraniteContext.getCurrentInstance(); ConvertersConfig convertersConfig = (ConvertersConfig)context.getGraniteConfig(); this.converters = convertersConfig.getConverters(); this.classGetter = convertersConfig.getClassGetter(); this.xmlUtil = XMLUtilFactory.getXMLUtil(); this.externalizersConfig = (ExternalizersConfig)context.getGraniteConfig(); this.externalizeLong = (externalizersConfig.getExternalizer(Long.class.getName()) != null); this.externalizeBigInteger = (externalizersConfig.getExternalizer(BigInteger.class.getName()) != null); this.externalizeBigDecimal = (externalizersConfig.getExternalizer(BigDecimal.class.getName()) != null); String channelId = context.getAMFContext().getChannelId(); ChannelConfig channelConfig = context.getServicesConfig(); this.legacyXmlSerialization = getChannelProperty(channelId, channelConfig, "legacyXmlSerialization"); this.legacyCollectionSerialization = getChannelProperty(channelId, channelConfig, "legacyCollectionSerialization"); }
public String getChannelId() { Message message = getRequest(); if (message != null) { Object id = message.getHeader(Message.ENDPOINT_HEADER); if (id instanceof String) return (String)id; } return null; }
private GraniteSecurity getSecurityHandler() { GraniteContext graniteContext = GraniteManager.getCurrentInstance(); if (graniteContext != null) { Message message = graniteContext.getAMFContext().getRequest(); Service service = graniteContext.getServicesConfig().findServiceByDestination(message.getDestination()); if (service != null) { synchronized (securityMap) { return securityMap.get(service.getId()); } } } return null; }