congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Option (scala)
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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