omq.client.proxy

## Class Proxymq

- java.lang.Object
- - omq.client.proxy.Proxymq

- All Implemented Interfaces:
    java.io.Serializable, java.lang.reflect.InvocationHandler, Remote

      public class Proxymq
      extends java.lang.Object
      implements java.lang.reflect.InvocationHandler, Remote

  Proxymq class. This class inherits from InvocationHandler, for this reason each proxymq instance has an associated invocation handler. When a method is invoked on a proxymq instance, the method invocation is encoded and dispatched to the invoke method of its invocation handler.
  Author:
    Sergi Toda
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Proxymq(java.lang.String uid, java.lang.Class<?> clazz, Broker broker)` Proxymq Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getRef()` Returns the UID of a RemoteObject
    `java.util.Map<java.lang.String,byte[]>` | `getResults()` Gets the Map used internally to retreive the response of the server
    `java.lang.Object` | `invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] arguments)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Proxymq

          public Proxymq(java.lang.String uid,
                 java.lang.Class<?> clazz,
                 Broker broker)
                  throws java.lang.Exception

      Proxymq Constructor. This constructor uses an uid to know which object will call. It also uses Properties to set where to send the messages
      Parameters:
        `uid` - The uid represents the unique identifier of a remote object
        `clazz` - It represents the real class of the remote object. With this class the system can know the remoteInterface used and it can also see which annotations are used
        `env` - The environment is used to know where to send the messages
      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### invoke

          public java.lang.Object invoke(java.lang.Object proxy,
                                java.lang.reflect.Method method,
                                java.lang.Object[] arguments)
                                  throws java.lang.Throwable

      Specified by:
        `invoke` in interface `java.lang.reflect.InvocationHandler`
      Throws:
        `java.lang.Throwable`

    - #### getResults

          public java.util.Map<java.lang.String,byte[]> getResults()

      Gets the Map used internally to retreive the response of the server
      Returns:
        a map with all the keys processed. Every key is a correlation id of a method invoked remotely

    - #### getRef

          public java.lang.String getRef()

      Description copied from interface: `Remote`
      Returns the UID of a RemoteObject
      Specified by:
        `getRef` in interface `Remote`
      Returns:
        UID