congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ServicesConfig.findChannelById
Code IndexAdd Tabnine to your IDE (free)

How to use
findChannelById
method
in
org.granite.config.flex.ServicesConfig

Best Java code snippets using org.granite.config.flex.ServicesConfig.findChannelById (Showing top 7 results out of 315)

origin: org.graniteds/granite-server

@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;
}
 
origin: org.graniteds/granite-client

  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;
  }
}
origin: org.ow2.kerneos.graniteds-osgi/granite-core

@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");
  }
}
origin: org.ow2.kerneos.graniteds-osgi/granite-core

@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");
  }
}
origin: org.graniteds/granite-server

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);
}
 
origin: org.graniteds/granite-server

public void initServices(ServicesConfig servicesConfig) {
  Channel channel = servicesConfig.findChannelById("gravityamf");
  if (channel == null) {
    channel = new Channel("gravityamf", "org.granite.gravity.channels.GravityChannel",
origin: org.graniteds/granite-server

Channel channel = servicesConfig.findChannelById("graniteamf");
if (channel == null) {
  channel = new Channel("graniteamf", "mx.messaging.channels.AMFChannel", 
org.granite.config.flexServicesConfigfindChannelById

Popular methods of ServicesConfig

  • findDestinationById
  • findFactoryById
  • <init>
  • addChannel
  • addFactory
  • addService
  • findServiceById
  • forElement
  • handleClass
  • loadConfig
  • scan
  • scanConfig
  • scan,
  • scanConfig,
  • findServiceByDestination,
  • findServicesByMessageType,
  • removeChannel,
  • removeFactory,
  • removeService

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Table (org.hibernate.mapping)
    A relational table
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now