@Override public boolean getChannelProperty(String channelId, String propertyName) { if (channelId == null) return false; Channel channel = findChannelById(channelId); if (channel == null) { log.debug("Could not get channel for channel id: %s", channelId); return false; } if ("legacyXmlSerialization".equals(propertyName)) return channel.isLegacyXmlSerialization(); else if ("legacyCollectionSerialization".equals(propertyName)) return channel.isLegacyCollectionSerialization(); return false; }
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; } }
@Validate public void start() { log.debug("Start OSGiChannelGravity: " + toString()); if (servicesConfig.findChannelById(id) == null) { try { Dictionary properties = new Hashtable(); properties.put("URI", endPoint.getUri()); Dictionary filters = new Hashtable(); filters.put("context", "(ID=" + context + ")"); properties.put("requires.filters", filters); servlet = servletBuilder.createComponentInstance(properties); servicesConfig.addChannel(this); started = true; } catch (Exception e) { log.error("Can't create the servlet for \"" + id + "\""); } } else { log.error("Channel \"" + id + "\" already registered"); } }
@Validate public void start() { log.debug("Start OSGiChannelGranite: " + toString()); if (servicesConfig.findChannelById(id) == null) { try { Dictionary properties = new Hashtable(); properties.put("URI", endPoint.getUri()); Dictionary filters = new Hashtable(); filters.put("context", "(ID=" + context + ")"); properties.put("requires.filters", filters); servlet = servletBuilder.createComponentInstance(properties); servicesConfig.addChannel(this); started = true; } catch (Exception e) { log.error("Can't create the servlet for \"" + id + "\""); } } else { log.error("Channel \"" + id + "\" already registered"); } }
public void initServices(ServicesConfig servicesConfig) { Channel channel = servicesConfig.findChannelById("graniteamf"); if (channel == null) { channel = new Channel("graniteamf", "mx.messaging.channels.AMFChannel", new EndPoint("http://{server.name}:{server.port}/{context.root}/graniteamf/amf", "flex.messaging.endpoints.AMFEndpoint"), new XMap()); servicesConfig.addChannel(channel); } List<Service> services = servicesConfig.findServicesByMessageType("flex.messaging.messages.RemotingMessage"); Service service = null; if (services == null || services.isEmpty()) { service = new Service("granite-service", "flex.messaging.services.RemotingService", "flex.messaging.messages.RemotingMessage", null, null, new HashMap<String, Destination>()); servicesConfig.addService(service); } else service = services.get(0); service.getDestinations().put(source, buildDestination()); log.info("Registered remote destination %s", source); }
public void initServices(ServicesConfig servicesConfig) { Channel channel = servicesConfig.findChannelById("gravityamf"); if (channel == null) { channel = new Channel("gravityamf", "org.granite.gravity.channels.GravityChannel",
Channel channel = servicesConfig.findChannelById("graniteamf"); if (channel == null) { channel = new Channel("graniteamf", "mx.messaging.channels.AMFChannel",