Nitido Inc.

com.nitido.nim
Interface Nimlet

All Known Implementing Classes:
ADTrackingRedirectNimlet

public interface Nimlet

A Nimlet is an application component that is executed within a container. Application developers implement the Nimlet interface to provide application business logic to generate dynamic content.

All Nimlet implementations must provide a default constructor that does not take any parameter. The NimletContainer or NimletDriver use this constructor to instantiate the Nimlet.

Nimlets typically run on multithreaded servers, so it is important to note that a nimlet must handle concurrent requests and be careful to synchronize access to shared resources. Shared resources include in-memory data such as instance or class variables and external objects such as files, database connections, and network connections.


Method Summary
 void execute(Entity entity, NimletInput in, NimletOutput out)
          This method is called to handle an authenticated request from an entity.
 void execute(NimletInput in, NimletOutput out)
          This method is called to handle a non-authenticated request from a client.
 void init(java.util.HashMap map)
          This method is called by the NimletContainer or NimletDriver to initialize the Nimlet.
 

Method Detail

init

void init(java.util.HashMap map)
          throws InitializationFailedException,
                 NimletException
This method is called by the NimletContainer or NimletDriver to initialize the Nimlet. This method is guaranteed to be called once for the lifecycle of the nimlet.

Parameters:
map - HashMap will all the initialization settings for the Nimlet.
Throws:
InitializationFailedException - If unable to initialize the Nimlet.
NimletException - This exception is thrown by the application developer wants to use the default error handling mechanism of the NimletContainer.

execute

void execute(Entity entity,
             NimletInput in,
             NimletOutput out)
             throws NimletException
This method is called to handle an authenticated request from an entity. A request is considered authenticated if an Entity has been attached to the NimletContainer.

Parameters:
entity - The Entity object for which the request takes place
in - The NimletInput contains all the input data related to the current request.
out - The NimletOutput contains all the data this Nimlet produces as the result of executing the request.
Throws:
NimletException - This exception is thrown by the application developer wants to use the default error handling mechanism of the NimletContainer.

execute

void execute(NimletInput in,
             NimletOutput out)
             throws NimletException
This method is called to handle a non-authenticated request from a client. A request is considered to be non-authenticated if an Entity that represents the client has not been attached to the NimletContainer.

Parameters:
in - The NimletInput contains all the input data related to the current request.
out - The NimletOutput contains all the data this Nimlet produces as the result of executing the request.
Throws:
NimletException - This exception is thrown by the application developer wants to use the default error handling mechanism of the NimletContainer.

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.