net.craftforge.essential.client
Class LocalClient

java.lang.Object
  extended by net.craftforge.essential.client.LocalClient
All Implemented Interfaces:
Client

public class LocalClient
extends Object
implements Client

A local client performs client requests locally against via a controller.

Since:
06.07.11
Author:
Christian Bick

Constructor Summary
LocalClient(String packagePath)
          Creates a local client and initializes a controller for resource classes in the given package path.
LocalClient(String packagePath, Configuration config)
          Creates a local client and initializes a controller for resource classes in the given package path.
 
Method Summary
 ClientResponse performRequest(ClientRequest clientRequest)
          Performs a local request by delegating the client request to the used controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalClient

public LocalClient(String packagePath)
Creates a local client and initializes a controller for resource classes in the given package path.

Parameters:
packagePath - The package path

LocalClient

public LocalClient(String packagePath,
                   Configuration config)
Creates a local client and initializes a controller for resource classes in the given package path. Uses the specified configuration to configure the controller.

Parameters:
packagePath - The package path
config - The controller configuration
Method Detail

performRequest

public ClientResponse performRequest(ClientRequest clientRequest)
Performs a local request by delegating the client request to the used controller. Retrieves the controller output and provides it as client response.

Specified by:
performRequest in interface Client
Parameters:
clientRequest - The client request
Returns:
The client response


Copyright © 2011. All Rights Reserved.