コード例 #1
0
 @Override
 public Object unmarshalObject(final AOByteBuffer buf) {
   super.unmarshalObject(buf);
   final byte flag_bits0 = buf.getByte();
   if ((flag_bits0 & 0x1) != 0x0) {
     this.namespace = (Namespace) MarshallingRuntime.unmarshalObject(buf);
   }
   return this;
 }
コード例 #2
0
 protected Message makeMessage(final AOObject obj, final Region region) {
   MessageType type = null;
   final String typeName = (String) region.getProperty("messageType");
   if (typeName != null && !typeName.equals("")) {
     type = MessageCatalog.getMessageType(typeName);
     if (type == null) {
       Log.error("MessageRegionTrigger: unknown messageType=" + typeName);
       return null;
     }
   }
   String messageClass = (String) region.getProperty("messageClass");
   if (messageClass == null || messageClass.equals("")) {
     messageClass = "extension";
   }
   final String extensionType = (String) region.getProperty("messageExtensionType");
   Message message = null;
   if (messageClass.equals("extension")) {
     if (this.mode == 1) {
       final WorldManagerClient.TargetedExtensionMessage extMessage =
           new WorldManagerClient.TargetedExtensionMessage(obj.getOid(), obj.getOid());
       if (extensionType != null) {
         extMessage.setExtensionType(extensionType);
       }
       message = extMessage;
     } else if (this.mode == 2) {
       final WorldManagerClient.ExtensionMessage extMessage2 =
           new WorldManagerClient.ExtensionMessage(obj.getOid());
       if (extensionType != null) {
         extMessage2.setExtensionType(extensionType);
       }
       message = extMessage2;
     }
   } else if (messageClass.equals("property")) {
     if (this.mode == 1) {
       message = new WorldManagerClient.TargetedPropertyMessage(obj.getOid(), obj.getOid());
     } else if (this.mode == 2) {
       message = new PropertyMessage(type, obj.getOid());
     }
   }
   if (message != null && type != null) {
     message.setMsgType(type);
   }
   return message;
 }
コード例 #3
0
 @Override
 public void marshalObject(final AOByteBuffer buf) {
   super.marshalObject(buf);
   byte flag_bits = 0;
   if (this.namespace != null) {
     flag_bits = 1;
   }
   buf.putByte(flag_bits);
   if (this.namespace != null) {
     MarshallingRuntime.marshalObject(buf, (Object) this.namespace);
   }
 }