com.strongloop.android.remoting

## Class Prototype

- java.lang.Object
- - com.strongloop.android.remoting.Prototype

    public class Prototype
    extends java.lang.Object

A local representative of classes ("prototypes" in JavaScript) defined and made remotable on the server.

### Constructor Summary

Constructors
Constructor and Description
`Prototype(java.lang.String className)` Creates a new Prototype, associating it with the named remote class.

### Method Summary

Methods
`VirtualObject` `createObject(java.util.Map<java.lang.String,? extends java.lang.Object> creationParameters)` Creates a new `VirtualObject` as a virtual instance of this remote class.
`Adapter` `getAdapter()` Gets the `Adapter` that should be used for invoking methods, both for static methods on this prototype and all methods on all instances of this prototype.
`java.lang.String` `getClassName()` Gets the name given to this prototype on the server.
`void` `invokeStaticMethod(java.lang.String method, java.util.Map<java.lang.String,? extends java.lang.Object> parameters, Adapter.Callback callback)` Invokes a remotable method exposed statically within this class on the server.
`void` `setAdapter(Adapter adapter)` Sets the `Adapter` that should be used for invoking methods, both for static methods on this prototype and all methods on all instances of this prototype.

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

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

### Constructor Detail

#### Prototype

    public Prototype(java.lang.String className)

Creates a new Prototype, associating it with the named remote class.

Parameters:
  `className` - The remote class name.

### Method Detail

#### getClassName

    public java.lang.String getClassName()

Gets the name given to this prototype on the server.

Returns:
  the class name.

#### getAdapter

    public Adapter getAdapter()

Gets the `Adapter` that should be used for invoking methods, both for static methods on this prototype and all methods on all instances of this prototype.

Returns:
  the adapter.

#### setAdapter

    public void setAdapter(Adapter adapter)

Sets the `Adapter` that should be used for invoking methods, both for static methods on this prototype and all methods on all instances of this prototype.

Parameters:
  `adapter` - The adapter.

#### createObject

    public VirtualObject createObject(java.util.Map<java.lang.String,? extends java.lang.Object> creationParameters)

Creates a new `VirtualObject` as a virtual instance of this remote class.

Parameters:
  `creationParameters` - The creation parameters of the new object.
Returns:
  A new `VirtualObject` based on this prototype.

#### invokeStaticMethod

    public void invokeStaticMethod(java.lang.String method,
                          java.util.Map<java.lang.String,? extends java.lang.Object> parameters,
                          Adapter.Callback callback)

Invokes a remotable method exposed statically within this class on the server.

Parameters:
  `method` - The method to invoke (without the class name), e.g. `"doSomething"`.
  `parameters` - The parameters to invoke with.
  `callback` - The callback to invoke when the execution finishes.
See Also:
  `Adapter.invokeStaticMethod(String, Map, com.strongloop.android.remoting.adapters.Adapter.Callback)`