Examples of Portable


Examples of com.hazelcast.nio.serialization.Portable

                Object key = event.getKey();
                Object value = event.getValue();
                Object oldValue = event.getOldValue();
                EntryEventType eventType = event.getEventType();
                String uuid = event.getMember().getUuid();
                Portable portableEntryEvent = new ReplicatedMapPortableEntryEvent(key, value, oldValue, eventType, uuid);
                endpoint.sendEvent(portableEntryEvent, getCallId());
            }
        }
View Full Code Here

Examples of com.hazelcast.nio.serialization.Portable

*/
public class ClientPortableFactory implements PortableFactory {

    @Override
    public Portable create(int classId) {
        Portable portable;
        switch (classId) {
            case ClientPortableHook.GENERIC_ERROR:
                portable = new GenericError();
                break;
            case ClientPortableHook.AUTH:
View Full Code Here

Examples of com.hazelcast.nio.serialization.Portable

                Object key = event.getKey();
                Object value = event.getValue();
                Object oldValue = event.getOldValue();
                EntryEventType eventType = event.getEventType();
                String uuid = event.getMember().getUuid();
                Portable portableEntryEvent = new ReplicatedMapPortableEntryEvent(key, value, oldValue, eventType, uuid);
                endpoint.sendEvent(portableEntryEvent, getCallId());
            }
        }
View Full Code Here

Examples of com.hazelcast.nio.serialization.Portable

*/
public class ClientPortableFactory implements PortableFactory {

    @Override
    public Portable create(int classId) {
        Portable portable;
        switch (classId) {
            case ClientPortableHook.GENERIC_ERROR:
                portable = new GenericError();
                break;
            case ClientPortableHook.AUTH:
View Full Code Here

Examples of org.jboss.errai.common.client.api.annotations.Portable

    Map<Class<?>, Class<?>> aliasToMarshaller = new HashMap<Class<?>, Class<?>>();

    for (Class<?> mappedClass : exposedClasses) {
      if (mappedClass.isSynthetic()) continue;

      Portable portable = mappedClass.getAnnotation(Portable.class);
      if (portable != null && !portable.aliasOf().equals(Object.class)) {
        aliasToMarshaller.put(mappedClass, portable.aliasOf());
      }
      else if (!hasDefinition(mappedClass)) {
        MappingDefinition def = DefaultJavaDefinitionMapper.map(JavaReflectionClass.newUncachedInstance(mappedClass),
                this);
        def.setMarshallerInstance(new DefaultDefinitionMarshaller(def));
View Full Code Here

Examples of org.jboss.errai.common.client.api.annotations.Portable

          }
        }

        for (Class<?> exposed : factory.getExposedClasses()) {
          if (exposed.isAnnotationPresent(Portable.class)) {
            Portable p = exposed.getAnnotation(Portable.class);

            if (!p.aliasOf().equals(Object.class)) {
              if (!factory.hasDefinition(p.aliasOf())) {
                throw new RuntimeException("cannot alias " + exposed.getName() + " to unmapped type: "
                        + p.aliasOf().getName());
              }

              factory.getDefinition(exposed)
                      .setMarshallerInstance(factory.getDefinition(p.aliasOf()).getMarshallerInstance());
            }

            if (exposed.isEnum()) {
              factory.getDefinition(exposed)
                      .setMarshallerInstance(new DefaultEnumMarshaller(exposed));
View Full Code Here

Examples of org.jboss.errai.common.client.api.annotations.Portable

          }
        }

        for (Class<?> exposed : factory.getExposedClasses()) {
          if (exposed.isAnnotationPresent(Portable.class)) {
            Portable p = exposed.getAnnotation(Portable.class);

            if (!p.aliasOf().equals(Object.class)) {
              if (!factory.hasDefinition(p.aliasOf())) {
                throw new RuntimeException("cannot alias " + exposed.getName() + " to unmapped type: "
                        + p.aliasOf().getName());
              }

              factory.getDefinition(exposed)
                      .setMarshallerInstance(factory.getDefinition(p.aliasOf()).getMarshallerInstance());
            }

            if (exposed.isEnum()) {
              factory.getDefinition(exposed)
                      .setMarshallerInstance(new DefaultEnumMarshaller(exposed));
View Full Code Here

Examples of org.jboss.errai.common.client.api.annotations.Portable

          }
        }

        for (Class<?> exposed : factory.getExposedClasses()) {
          if (exposed.isAnnotationPresent(Portable.class)) {
            Portable p = exposed.getAnnotation(Portable.class);

            if (!p.aliasOf().equals(Object.class)) {
              if (!factory.hasDefinition(p.aliasOf())) {
                throw new RuntimeException("cannot alias " + exposed.getName() + " to unmapped type: "
                        + p.aliasOf().getName());
              }

              factory.getDefinition(exposed)
                      .setMarshallerInstance(factory.getDefinition(p.aliasOf()).getMarshallerInstance());
            }

            if (exposed.isEnum()) {
              factory.getDefinition(exposed)
                      .setMarshallerInstance(new DefaultEnumMarshaller(exposed));
View Full Code Here

Examples of org.jboss.errai.common.client.api.annotations.Portable

    final Map<Class<?>, Class<?>> aliasToMarshaller = new HashMap<Class<?>, Class<?>>();

    for (Class<?> mappedClass : exposedClasses) {
      if (mappedClass.isSynthetic()) continue;

      Portable portable = mappedClass.getAnnotation(Portable.class);
      if (portable != null && !portable.aliasOf().equals(Object.class)) {
        aliasToMarshaller.put(mappedClass, portable.aliasOf());
      }
      else if (!hasDefinition(mappedClass)) {
        MappingDefinition def = DefaultJavaDefinitionMapper.map(JavaReflectionClass.newUncachedInstance(mappedClass),
                this);
        def.setMarshallerInstance(new DefaultDefinitionMarshaller(def));
View Full Code Here

Examples of org.jboss.errai.common.client.api.annotations.Portable

          }
        }

        for (Class<?> exposed : factory.getExposedClasses()) {
          if (exposed.isAnnotationPresent(Portable.class)) {
            Portable p = exposed.getAnnotation(Portable.class);

            if (!p.aliasOf().equals(Object.class)) {
              if (!factory.hasDefinition(p.aliasOf())) {
                throw new RuntimeException("cannot alias " + exposed.getName() + " to unmapped type: "
                        + p.aliasOf().getName());
              }

              factory.getDefinition(exposed)
                      .setMarshallerInstance(factory.getDefinition(p.aliasOf()).getMarshallerInstance());
            }

            if (exposed.isEnum()) {
              factory.getDefinition(exposed)
                      .setMarshallerInstance(new DefaultEnumMarshaller(exposed));
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.