omq.server

## Class RemoteObject

- java.lang.Object
- - java.lang.Thread
  - - omq.server.RemoteObject

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Runnable, Remote
  Direct Known Subclasses:
    BrokerKillerImpl, CalculatorImpl, CalculatorImpl, ContactListImpl, MessageImpl, MessageImpl, NumberImpl, OmqServerImpl, RemoteObserverImpl, RemoteSubjectImpl, RemoteWorkspaceImpl

      public abstract class RemoteObject
      extends java.lang.Thread
      implements Remote

  A RemoteObject when it's started will be waiting for requests and will invoke them. When a RemoteObject is started it listens two queues, the first one has the same name as its reference and the second one is its multiqueue -this name can be set using a property, be aware to use a name not used by another object!!!-.
  Author:
    Sergi Toda
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

  - ### Field Summary

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteObject()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.rabbitmq.client.Channel` | `getChannel()`
    `java.util.List<java.lang.Class<?>>` | `getParams(java.lang.String methodName)`
    `java.lang.String` | `getRef()` Returns the UID of a RemoteObject
    `java.lang.Object` | `invokeMethod(java.lang.String methodName, java.lang.Object[] arguments)` This method invokes the method specified by methodName and arguments
    `void` | `kill()` This method kills all the threads waiting for requests
    `void` | `run()`
    `void` | `startRemoteObject(java.lang.String reference, Broker broker, java.util.Properties env)` This method starts a remoteObject.

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

      `activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

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

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

- - ### Constructor Detail

    - #### RemoteObject

          public RemoteObject()

  - ### Method Detail

    - #### startRemoteObject

          public void startRemoteObject(java.lang.String reference,
                               Broker broker,
                               java.util.Properties env)
                                 throws java.lang.Exception

      This method starts a remoteObject.
      Parameters:
        `reference` - - broker's binding referece
        `broker` - - broker that binds this remoteObject
        `env` - - properties of this remoteObject
      Throws:
        `java.lang.Exception`

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`
      Overrides:
        `run` in class `java.lang.Thread`

    - #### 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

    - #### kill

          public void kill()
                    throws java.io.IOException

      This method kills all the threads waiting for requests
      Throws:
        `java.io.IOException` - - If an operation failed.

    - #### invokeMethod

          public java.lang.Object invokeMethod(java.lang.String methodName,
                                      java.lang.Object[] arguments)
                                        throws java.lang.Exception

      This method invokes the method specified by methodName and arguments
      Parameters:
        `methodName` -
        `arguments` -
      Returns:
        result
      Throws:
        `java.lang.Exception`

    - #### getParams

          public java.util.List<java.lang.Class<?>> getParams(java.lang.String methodName)

    - #### getChannel

          public com.rabbitmq.client.Channel getChannel()