Urbi SDK Remote for Java  2.7.5
UMessage.java
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 2.0.4
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package urbi;
00010   /// Class containing all informations related to an URBI message.
00011 
00012 public class UMessage {
00013   private long swigCPtr;
00014   protected boolean swigCMemOwn;
00015 
00016   public UMessage(long cPtr, boolean cMemoryOwn) {
00017     swigCMemOwn = cMemoryOwn;
00018     swigCPtr = cPtr;
00019   }
00020 
00021   public static long getCPtr(UMessage obj) {
00022     return (obj == null) ? 0 : obj.swigCPtr;
00023   }
00024 
00025   protected void finalize() {
00026     delete();
00027   }
00028 
00029   public synchronized void delete() {
00030     if (swigCPtr != 0) {
00031       if (swigCMemOwn) {
00032         swigCMemOwn = false;
00033         urbiJNI.delete_UMessage(swigCPtr);
00034       }
00035       swigCPtr = 0;
00036     }
00037   }
00038 
00039   public UMessage(UAbstractClient client) {
00040     this(urbiJNI.new_UMessage__SWIG_0(UAbstractClient.getCPtr(client), client), true);
00041   }
00042 
00043   public UMessage(UAbstractClient client, int timestamp, String tag, String message) {
00044     this(urbiJNI.new_UMessage__SWIG_1(UAbstractClient.getCPtr(client), client, timestamp, tag, message), true);
00045   }
00046 
00047   public UMessage(UAbstractClient client, int timestamp, String tag, String message, SWIGTYPE_p_std__listT_urbi__BinaryData_t bins) {
00048     this(urbiJNI.new_UMessage__SWIG_2(UAbstractClient.getCPtr(client), client, timestamp, tag, message, SWIGTYPE_p_std__listT_urbi__BinaryData_t.getCPtr(bins)), true);
00049   }
00050 
00051   public UMessage(UMessage source) {
00052     this(urbiJNI.new_UMessage__SWIG_4(UMessage.getCPtr(source), source), true);
00053   }
00054 
00055   public void setTimestamp(int value) {
00056     urbiJNI.UMessage_timestamp_set(swigCPtr, this, value);
00057   }
00058 
00059   public int getTimestamp() {
00060     return urbiJNI.UMessage_timestamp_get(swigCPtr, this);
00061   }
00062 
00063   public void setTag(String value) {
00064     urbiJNI.UMessage_tag_set(swigCPtr, this, value);
00065   }
00066 
00067   public String getTag() {
00068     return urbiJNI.UMessage_tag_get(swigCPtr, this);
00069   }
00070 
00071   public void setType(UMessageType value) {
00072     urbiJNI.UMessage_type_set(swigCPtr, this, value.swigValue());
00073   }
00074 
00075   public UMessageType getType() {
00076     return UMessageType.swigToEnum(urbiJNI.UMessage_type_get(swigCPtr, this));
00077   }
00078 
00079   public void setValue(UValue value) {
00080     urbiJNI.UMessage_value_set(swigCPtr, this, UValue.getCPtr(value), value);
00081   }
00082 
00083   public UValue getValue() {
00084     long cPtr = urbiJNI.UMessage_value_get(swigCPtr, this);
00085     return (cPtr == 0) ? null : new UValue(cPtr, false);
00086   }
00087 
00088   public void setMessage(String value) {
00089     urbiJNI.UMessage_message_set(swigCPtr, this, value);
00090   }
00091 
00092   public String getMessage() {
00093     return urbiJNI.UMessage_message_get(swigCPtr, this);
00094   }
00095 
00096   public void setRawMessage(String value) {
00097     urbiJNI.UMessage_rawMessage_set(swigCPtr, this, value);
00098   }
00099 
00100   public String getRawMessage() {
00101     return urbiJNI.UMessage_rawMessage_get(swigCPtr, this);
00102   }
00103 
00104   public UAbstractClient getClient() {
00105     return new UAbstractClient(urbiJNI.UMessage_getClient(swigCPtr, this), false);
00106   }
00107 
00108 }