@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); }
new EndPoint("http://{server.name}:{server.port}/{context.root}/gravityamf/amf", "flex.messaging.endpoints.AMFEndpoint"), new XMap()); servicesConfig.addChannel(channel);
new EndPoint("http://{server.name}:{server.port}/{context.root}/graniteamf/amf", "flex.messaging.endpoints.AMFEndpoint"), new XMap()); servicesConfig.addChannel(channel);