Tabnine Logo
Destination.getProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
getProperties
method
in
org.granite.config.flex.Destination

Best Java code snippets using org.granite.config.flex.Destination.getProperties (Showing top 18 results out of 315)

origin: org.graniteds/granite-server

  @Override
  protected Destination buildDestination(Adapter adapter) {
    Destination destination = super.buildDestination(adapter);
    destination.getProperties().put("server", null);
    destination.getProperties().put("server/broker-url", brokerUrl);
    destination.getProperties().put("server/create-broker", String.valueOf(createBroker));
    if (createBroker) {
      destination.getProperties().put("server/wait-for-start", String.valueOf(waitForStart));
      destination.getProperties().put("server/durable", String.valueOf(durable));
      if (durable)
        destination.getProperties().put("server/file-store-root", fileStoreRoot);
    }
    return destination;
  }
}
origin: org.graniteds/granite-server

  @Override
  protected Destination buildDestination(Adapter adapter) {
    Destination destination = super.buildDestination(adapter);
    destination.getProperties().put("jms", null);
    destination.getProperties().put("jms/destination-type", "Topic");
    destination.getProperties().put("jms/destination-name", name);
    destination.getProperties().put("jms/destination-jndi-name", destinationJndiName);
    destination.getProperties().put("jms/connection-factory", connectionFactoryJndiName);
    if (textMessages)
      destination.getProperties().put("jms/message-type", "javax.jms.TextMessage");
    destination.getProperties().put("jms/acknowledge-mode", acknowledgeMode);
    destination.getProperties().put("jms/transacted-sessions", String.valueOf(transactedSessions));
    destination.getProperties().put("jms/no-local", String.valueOf(isNoLocal()));
    return destination;
  }
}
origin: org.graniteds/granite-server

  protected Destination buildDestination(Adapter adapter) {
    List<String> channelIds = new ArrayList<String>();
    channelIds.add("gravityamf");
    Destination destination = new Destination(id, channelIds, new XMap(), roles, adapter, null);
    destination.getProperties().put("no-local", String.valueOf(noLocal));
    destination.getProperties().put("session-selector", String.valueOf(sessionSelector));
    if (getSecurizerClassName() != null)
      destination.getProperties().put("securizer", securizerClassName);
    if (getSecurizer() != null)
      destination.setSecurizer(getSecurizer());
    return destination;
  }
}
origin: org.graniteds/granite-server-cdi

  @Override
  public ServiceInvoker<?> getServiceInstance(RemotingMessage request) throws ServiceException {
    String messageType = request.getClass().getName();
    String destinationId = request.getDestination();

    ServicesConfig servicesConfig = GraniteContext.getCurrentInstance().getServicesConfig();
    Destination destination = servicesConfig.findDestinationById(messageType, destinationId);
    if (destination == null)
      throw new ServiceException("No matching destination: " + destinationId);
    
    if (!destination.getProperties().containsKey(TideServiceInvoker.VALIDATOR_CLASS_NAME))
      destination.getProperties().put(TideServiceInvoker.VALIDATOR_CLASS_NAME, "org.granite.tide.validation.BeanValidation");
    
    @SuppressWarnings("unchecked")
    Bean<PersistenceConfiguration> pcBean = (Bean<PersistenceConfiguration>)manager.getBeans(PersistenceConfiguration.class).iterator().next();
    PersistenceConfiguration persistenceConfiguration = (PersistenceConfiguration)manager.getReference(pcBean, PersistenceConfiguration.class, manager.createCreationalContext(pcBean));
    if (destination.getProperties().containsKey(ENTITY_MANAGER_FACTORY_JNDI_NAME))
      persistenceConfiguration.setEntityManagerFactoryJndiName(destination.getProperties().get(ENTITY_MANAGER_FACTORY_JNDI_NAME));
    else if (destination.getProperties().containsKey(ENTITY_MANAGER_JNDI_NAME))
      persistenceConfiguration.setEntityManagerJndiName(destination.getProperties().get(ENTITY_MANAGER_JNDI_NAME));
    
    // Create an instance of the component
    CDIServiceInvoker invoker = new CDIServiceInvoker(destination, this);
    return invoker;
  }
}
origin: org.graniteds/granite-server-ejb

  private ServiceInvoker<?> getServiceInvoker(Map<String, Object> cache, Destination destination, String key) {
    GraniteContext context = GraniteContext.getCurrentInstance();
    synchronized (context.getSessionLock()) {
      ServiceInvoker<?> invoker = (ServiceInvoker<?>)cache.get(key);
      if (invoker == null) {
        String lookup = getLookup();

        if (destination.getProperties().containsKey("lookup"))
          lookup = destination.getProperties().get("lookup");
        
        EjbServiceContext tideContext = new EjbServiceContext(lookup, initialContext); 
        
        if (destination.getProperties().containsKey(ENTITY_MANAGER_FACTORY_JNDI_NAME)) {
          tideContext.setEntityManagerFactoryJndiName(destination.getProperties().get(ENTITY_MANAGER_FACTORY_JNDI_NAME));
        } 
        else if (destination.getProperties().containsKey(ENTITY_MANAGER_JNDI_NAME)) {
          tideContext.setEntityManagerJndiName(destination.getProperties().get(ENTITY_MANAGER_JNDI_NAME));
        }
        
        invoker = new TideServiceInvoker<EjbServiceFactory>(destination, this, tideContext);
        cache.put(key, invoker);
      }
      return invoker;
    }
  }
}
origin: org.ow2.kerneos.graniteds-osgi/granite-core

  private Map<String, Object> getCache(Destination destination) throws ServiceException {
    GraniteContext context = GraniteManager.getCurrentInstance();
    String scope = destination.getProperties().get("scope");

    Map<String, Object> cache = null;
    if (scope == null || "request".equals(scope))
      cache = context.getRequestMap();
    else if ("session".equals(scope))
      cache = context.getSessionMap();
    else if ("application".equals(scope))
      cache = Collections.synchronizedMap(context.getApplicationMap());
    else
      throw new ServiceException("Illegal scope in destination: " + destination);

    return cache;
  }
}
origin: org.graniteds/granite-client

  private Map<String, Object> getCache(Destination destination) throws ServiceException {
    GraniteContext context = GraniteContext.getCurrentInstance();
    String scope = destination.getProperties().get("scope");

    Map<String, Object> cache = null;
    if (scope == null || "request".equals(scope))
      cache = context.getRequestMap();
    else if ("session".equals(scope))
      cache = context.getSessionMap();
    else if ("application".equals(scope))
      cache = Collections.synchronizedMap(context.getApplicationMap());
    else
      throw new ServiceException("Illegal scope in destination: " + destination);
    
    return cache;
  }
}
origin: org.graniteds/granite-server

  private Map<String, Object> getCache(Destination destination) throws ServiceException {
    GraniteContext context = GraniteContext.getCurrentInstance();
    String scope = destination.getProperties().get("scope");

    Map<String, Object> cache = null;
    if (scope == null || "request".equals(scope))
      cache = context.getRequestMap();
    else if ("session".equals(scope))
      cache = context.getSessionMap();
    else if ("application".equals(scope))
      cache = Collections.synchronizedMap(context.getApplicationMap());
    else
      throw new ServiceException("Illegal scope in destination: " + destination);
    
    return cache;
  }
}
origin: org.graniteds/granite-client

protected SimpleServiceInvoker(Destination destination, SimpleServiceFactory factory) throws ServiceException {
  super(destination, factory);
  String className = destination.getProperties().get("source");
  if (className == null)
    throw new ServiceException("No source property for destination: " + destination);
  className = className.trim();
  log.debug(">> New SimpleServiceInvoker constructing new: %s", className);
  // Invokee class set at runtime (RemoteObject.source).
  if ("*".equals(className))
    sources = new HashMap<String, Object>();
  else {
    try {
      if (destination.getScannedClass() != null)
        this.invokee = destination.getScannedClass().newInstance();
      else
        this.invokee = TypeUtil.newInstance(className);
    } catch (Exception e) {
      throw new ServiceException("Invalid source property for destination: " + destination, e);
    }
    sources = null;
  }
}
origin: org.graniteds/granite-server

protected SimpleServiceInvoker(Destination destination, SimpleServiceFactory factory) throws ServiceException {
  super(destination, factory);
  String className = destination.getProperties().get("source");
  if (className == null)
    throw new ServiceException("No source property for destination: " + destination);
  className = className.trim();
  log.debug(">> New SimpleServiceInvoker constructing new: %s", className);
  // Invokee class set at runtime (RemoteObject.source).
  if ("*".equals(className))
    sources = new HashMap<String, Object>();
  else {
    try {
      if (destination.getScannedClass() != null)
        this.invokee = destination.getScannedClass().newInstance();
      else
        this.invokee = TypeUtil.newInstance(className);
    } catch (Exception e) {
      throw new ServiceException("Invalid source property for destination: " + destination, e);
    }
    sources = null;
  }
}
origin: org.graniteds/granite-server-ejb

public EjbServiceInvoker(Destination destination, EjbServiceFactory factory) throws ServiceException {
  super(destination, factory);
  String lookup = factory.getLookup();
  if (destination.getProperties().containsKey("lookup"))
    lookup = destination.getProperties().get("lookup");
  // Compute EJB JNDI binding.
  String name = destination.getId();
  if (lookup != null) {
    name = lookup;
    if (lookup.contains(CAPITALIZED_DESTINATION_ID))
      name = lookup.replace(CAPITALIZED_DESTINATION_ID, capitalize(destination.getId()));
    if (lookup.contains(DESTINATION_ID))
      name = lookup.replace(DESTINATION_ID, destination.getId());
  }
  log.debug(">> New EjbServiceInvoker looking up: %s", name);
  try {
    invokee = factory.lookup(name);
  } catch (NamingException e) {
    throw new ServiceException("Could not lookup for: " + name, e);
  }
  
  this.metadata = destination.getScannedClass() != null ?
    new EjbServiceMetadata(destination.getScannedClass(), invokee.getClass()) :
    new EjbServiceMetadata(destination.getProperties(), invokee.getClass());
}
origin: org.graniteds/granite-server

  return;
String className = this.destination.getProperties().get(VALIDATOR_CLASS_NAME);
if (className != null) {
  initValidatorWithClassName(className, null);
  String name = this.destination.getProperties().get(VALIDATOR_NAME);
  if (name != null) {
    try {
origin: org.graniteds/granite-server

public static ServiceFactory getFactoryInstance(RemotingMessage request) throws ServiceException {
  GraniteContext context = GraniteContext.getCurrentInstance();
  String messageType = request.getClass().getName();
  String destinationId = request.getDestination();
  log.debug(">> Finding factoryId for messageType: %s and destinationId: %s", messageType, destinationId);
  Destination destination = ((ServicesConfig)context.getServicesConfig()).findDestinationById(messageType, destinationId);
  if (destination == null)
    throw new ServiceException("Destination not found: " + destinationId);
  String factoryId = destination.getProperties().get("factory");
  log.debug(">> Found factoryId: %s", factoryId);
  Map<String, Object> cache = context.getApplicationMap();
  String key = ServiceFactory.class.getName() + '.' + factoryId;
  return getServiceFactory(cache, context, factoryId, key);
}
origin: org.graniteds/granite-client

public static ServiceFactory getFactoryInstance(RemotingMessage request) throws ServiceException {
  GraniteContext context = GraniteContext.getCurrentInstance();
  String messageType = request.getClass().getName();
  String destinationId = request.getDestination();
  log.debug(">> Finding factoryId for messageType: %s and destinationId: %s", messageType, destinationId);
  Destination destination = context.getServicesConfig().findDestinationById(messageType, destinationId);
  if (destination == null)
    throw new ServiceException("Destination not found: " + destinationId);
  String factoryId = destination.getProperties().get("factory");
  log.debug(">> Found factoryId: %s", factoryId);
  Map<String, Object> cache = context.getApplicationMap();
  String key = ServiceFactory.class.getName() + '.' + factoryId;
  return getServiceFactory(cache, context, factoryId, key);
}
origin: org.ow2.kerneos.graniteds-osgi/granite-core

String factoryId = destination.getProperties().get("factory");
if (factoryId == null) {
  GraniteDestination gd;
origin: org.graniteds/granite-server

serviceAdapter.setId(adapterId);
serviceAdapter.setGravity(gravity);
serviceAdapter.configure(config.getProperties(), destination.getProperties());
serviceAdapter.start();
origin: org.graniteds/granite-server

List<String> tideRoles = serverFilter.tideRoles().length == 0 ? null : Arrays.asList(serverFilter.tideRoles());
Destination destination = new Destination(type, channelIds, new XMap(), tideRoles, null, null);
destination.getProperties().put("factory", "tide-" + type + "-factory");
if (!("".equals(serverFilter.entityManagerFactoryJndiName())))
  destination.getProperties().put("entity-manager-factory-jndi-name", serverFilter.entityManagerFactoryJndiName());
else if (!("".equals(serverFilter.entityManagerJndiName())))
  destination.getProperties().put("entity-manager-jndi-name", serverFilter.entityManagerJndiName());
if (!("".equals(serverFilter.validatorClassName())))
  destination.getProperties().put("validator-class-name", serverFilter.validatorClassName());
service.getDestinations().put(type, destination);
origin: org.graniteds/granite-server

if (Boolean.TRUE.toString().equals(destination.getProperties().get("session-selector"))) {
  String selector = gdd.getDestinationSelector(destination.getId());
  log.debug("Session selector found: %s", selector);
org.granite.config.flexDestinationgetProperties

Popular methods of Destination

  • getId
  • getScannedClass
  • <init>
  • addRemoveListener
  • forElement
  • getSecurizer
  • remove
  • getAdapter
  • getRoles
  • isSecured
  • setSecurizer
  • setSecurizer

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • Kernel (java.awt.image)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • 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