Examples of Local


Examples of br.com.syspartenon.partenon.domain.Local

        this.evento = evento;
    }

    public Local getLocal() {
        if(local == null){
            local = new Local();
            local.setEvento(evento);
        }
        return local;
    }
View Full Code Here

Examples of com.dianping.cat.consumer.cross.model.entity.Local

  private void updateCrossReport(CrossReport report, Transaction t, CrossInfo info) {
    String localIp = info.getLocalAddress();
    String remoteIp = info.getRemoteAddress();
    String role = info.getRemoteRole();
    String transactionName = t.getName();
    Local local = report.findOrCreateLocal(localIp);
    Remote remote = local.findOrCreateRemote(remoteIp);

    remote.setRole(role);
    remote.setApp(info.getApp());

    Type type = remote.getType();
View Full Code Here

Examples of com.peterhi.net.Local


public final class ServerApp {

  public static void main(String[] args) throws Exception {
    final Local local = new Local(22222);
    local.getSocket().setSoTimeout(10);
    local.addListener(new Listener() {
      @Override
      public void received(Event event) {
        SocketAddress address = event.getAddress();
        byte[] data = event.getData(true);
        System.out.println(MessageFormat.format("Received {0} bytes of data from {1}.", data.length, address));
      }     
    });
   
    Runnable worker = new Runnable() {
      @Override
      public void run() {
        try {
          while (local.getSocket().isBound()) {
            DatagramPacket packet = local.receive();
           
            if (packet != null) {
              local.process(packet);
            }
           
            local.dispatch();
          }
        } catch (Exception ex) {
          ex.printStackTrace();
        }
      }
View Full Code Here

Examples of com.zinep.sucursales.Local

                String nombre = matcher.group(1);
                Monto uyu = new Monto(Long.parseLong(matcher.group(2)), Moneda.UYU);
                Monto usd = new Monto(Long.parseLong(matcher.group(3)), Moneda.USD);

                if (nombre.equals("Local")) {
                    sucursal = new Local(nombre, uyu, usd);
                } else if (nombre.equals("Virtual")) {
                    sucursal = new Virtual(nombre, uyu, usd);
                }
                sucursales.add(sucursal);
            } else if ((matcher = rCliente.matcher(linea)).find()) {
View Full Code Here

Examples of com.zinep.sucursales.Local

        final TimeManager tiempo = TimeManager.get();

        Monto montoEnUYU = new Monto(100000L, Moneda.UYU);
        Monto montoEnUSD = new Monto(100000L, Moneda.UYU);

        final Sucursal sucursal = new Local("Central", montoEnUYU, montoEnUSD);
        final Banco banco = new Banco("Zinep", Arrays.asList(sucursal));

        for (Agente agente : sucursal.getAgentes()) {
            tiempo.add(agente);
        }

        Trabajador generadorClientes = new Trabajador() {

            private final Random random = new Random(12345L);
            private int contador = 0;

            @Override
            protected void ejecutar() {
                final Cuenta cuenta = new Cuenta(Moneda.UYU) {
                };
                final Cliente cliente = new Cliente(random.nextBoolean(), Arrays.asList(cuenta));
                cliente.addAll(sucursal, Deposito.efectuarDeposito(cliente, cuenta, sucursal, new Monto(-1, Moneda.UYU)));
                cliente.addAll(sucursal, Retiro.crearRetiro(cliente, cuenta, sucursal, new Monto(1000, Moneda.UYU)));
                sucursal.entraCliente(cliente);

                if (contador++ >= 10) {
                    detener();
                }
            }
View Full Code Here

Examples of ecar.api.facade.Local

          {
           
            ItemEstrutLocalIettl itemLocal = (ItemEstrutLocalIettl) it.next();

            String nomeLocal = "";
            Local local = new Local(itemLocal.getLocalItemLit());
            if(local.getAbrangencia() == Local.MUNICIPIO){
              //pega o simbolo do estado
              //testa antes, por que pode haver erros no banco de
              //dados, ou seja, um munic�pio sem estado...
              if(local.getPais() != null && local.getPais().size() > 0){
                nomeLocal = local.getPais().get(0).getSigla().concat(" ");
              }
             
              nomeLocal = nomeLocal.concat(itemLocal.getLocalItemLit().getIdentificacaoLit());
            }else{
              nomeLocal = itemLocal.getLocalItemLit().getIdentificacaoLit();
View Full Code Here

Examples of javax.ejb.Local

   {
      // Initialize
      Set<Class<?>> localAndBusinessLocalInterfaces = new HashSet<Class<?>>();

      // Obtain @Local
      Local localAnnotation = beanClass.getAnnotation(Local.class);

      // Obtain @LocalHome
      LocalHome localHomeAnnotation = beanClass.getAnnotation(LocalHome.class);

      // Obtain @Remote
      Remote remoteAnnotation = beanClass.getAnnotation(Remote.class);

      // Obtain Remote and Business Remote interfaces
      //Class<?>[] remoteAndBusinessRemoteInterfaces = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(container);

      // Obtain all business interfaces from the bean class
      Set<Class<?>> businessInterfacesImplementedByBeanClass = getBusinessInterfaces(beanClass);

      // Obtain all business interfaces directly implemented by the bean class (not including supers)
      Set<Class<?>> businessInterfacesDirectlyImplementedByBeanClass = getBusinessInterfaces(
              beanClass, false);

      // For each of the business interfaces implemented by the bean class
      for (Class<?> clazz : businessInterfacesImplementedByBeanClass)
      {
         // If @Local is on the interface
         if (clazz.isAnnotationPresent(Local.class))
         {
            // Add to the list of locals
            localAndBusinessLocalInterfaces.add(clazz);
         }
      }

      // EJBTHREE-1062
      // EJB 3 Core Specification 4.6.6
      // If bean class implements a single interface, that interface is assumed to be the
      // business interface of the bean. This business interface will be a local interface unless the
      // interface is designated as a remote business interface by use of the Remote
      // annotation on the bean class or interface or by means of the deployment descriptor.
      if (businessInterfacesDirectlyImplementedByBeanClass.size() == 1 && localAndBusinessLocalInterfaces.size() == 0)
      {
         // Obtain the implemented interface
         Class<?> singleInterface = businessInterfacesDirectlyImplementedByBeanClass.iterator().next();

         // If not explicitly marked as @Remote, and is a valid business interface
         if (remoteAnnotation == null && singleInterface.getAnnotation(Remote.class) == null)
         {
            // Return the implemented interface, adding to the container
            Class<?>[] returnValue = new Class[]
                    {singleInterface};
            return returnValue;
         }
      }

      // @Local was defined
      if (localAnnotation != null)
      {
         // If @Local has no value or empty value
         if (localAnnotation.value() == null || localAnnotation.value().length == 0)
         {
            // If @Local is defined with no value and there are no business interfaces
            if (businessInterfacesImplementedByBeanClass.size() == 0)
            {
               return new Class<?>[]
                       {};
            }
            // If more than one business interface is directly implemented by the bean class
            else if (businessInterfacesImplementedByBeanClass.size() > 1)
            {
               return new Class<?>[]
                       {};
            }
            // JIRA EJBTHREE-1062
            // EJB 3 4.6.6
            // If the bean class implements only one business interface, that
            //interface is exposed as local business if not denoted as @Remote
            else
            {
               // If not explicitly marked as @Remote
               if (remoteAnnotation == null)
               {
                  // Return the implemented interface and add to container
                  Class<?>[] returnValue = businessInterfacesImplementedByBeanClass.toArray(new Class<?>[]
                          {});
                  return returnValue;
               }
            }
         }
         // @Local has value
         else
         {
            // For each of the interfaces in @Local.value
            for (Class<?> clazz : localAnnotation.value())
            {
               // Add to the list of locals
               localAndBusinessLocalInterfaces.add(clazz);
            }
View Full Code Here

Examples of javax.ejb.Local

    ArrayList<BaseType> interfaceList = new ArrayList<BaseType>();
   
    addInterfaces(interfaceList, ejbClass, true);

    Local local = type.getAnnotation(Local.class);
    if (local != null && local.value() != null) {
      _localList.clear();

      for (Class<?> api : local.value()) {
        // XXX: grab from type?
        addLocal((Class) api);
      }
    }
View Full Code Here

Examples of javax.ejb.Local

    for (Type localApi : ejbClass.getGenericInterfaces()) {
      BaseType type = cdiManager.createTargetBaseType(localApi);
     
      Class<?> rawClass = type.getRawClass();
     
      Local local = rawClass.getAnnotation(Local.class);

      if (local != null) {
        addLocalType(type);
        continue;
      }
View Full Code Here

Examples of javax.ejb.Local

        name = type.getJavaClass().getSimpleName();
      }

      setEJBName(name);

      Local local = type.getAnnotation(Local.class);
      if (local != null) {
        for (Class<?> localClass : local.value()) {
          addLocal(localClass);
        }
      }
     
      if (type.isAnnotationPresent(LocalBean.class)) {
        _localBean = type;
      }
     
      if (_localList.size() == 0)
        _localBean = type;
     
      Remote remote = type.getAnnotation(Remote.class);
      if (remote != null) {
        for (Class<?> localClass : local.value()) {
          addRemote(localClass);
        }

        /*
        // ejb/0f08: single interface
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.