Package 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
Description
`CommandProxy(Object target, String function)`
`CommandProxy(org.osgi.framework.BundleContext context, org.osgi.framework.ServiceReference reference, String function)`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### CommandProxy

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

### CommandProxy

public CommandProxy(Object target, String function)

## Method Details

### 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`
Returns:
  the result from the execution.
Throws:
  `Exception` - if anything goes terribly wrong