org.apache.felix.gogo.runtime

## Class CommandProxy

- java.lang.Object
- - org.apache.felix.gogo.runtime.CommandProxy

All Implemented Interfaces:
  Function

    public class CommandProxy
    extends Object
    implements Function

### Constructor Summary

Constructors
Constructor and Description
`CommandProxy(org.osgi.framework.BundleContext context, org.osgi.framework.ServiceReference<?> reference, String function)`
`CommandProxy(Object target, String function)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `execute(CommandSession session, List<Object> arguments)` Execute this function and return the result.
`Object` `getTarget()`
`void` `ungetTarget()`

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

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

### Constructor Detail

#### CommandProxy

    public CommandProxy(org.osgi.framework.BundleContext context,
                        org.osgi.framework.ServiceReference<?> reference,
                        String function)

#### CommandProxy

    public CommandProxy(Object target,
                        String function)

### Method Detail

#### getTarget

    public Object getTarget()

#### ungetTarget

    public void ungetTarget()

#### execute

    public Object execute(CommandSession session,
                          List<Object> arguments)
                   throws Exception

Description copied from interface: `Function`
Execute this function and return the result.

Specified by:
  `execute` in interface `Function`
Parameters:
  `session` - the session
  `arguments` - the arguments
Returns:
  the result from the execution.
Throws:
  `Exception` - if anything goes terribly wrong