org.objectweb.dream.pushwithreturn
Class KeyGeneratorIntegerImpl

java.lang.Object
  extended byorg.objectweb.dream.AbstractComponent
      extended byorg.objectweb.dream.pushwithreturn.KeyGeneratorIntegerImpl
All Implemented Interfaces:
BindingController, KeyGenerator, LifeCycleController, Loggable

public class KeyGeneratorIntegerImpl
extends AbstractComponent
implements KeyGenerator

This generator generates KeyInteger objects with an increasing integer. It adds a KeyChunk chunk to the message.


Field Summary
static KeyInteger ALL_INTEGER_KEY
          The "All" Integer key.
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, componentDesc, fcState, firstStart, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.pushwithreturn.KeyGenerator
ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
KeyGeneratorIntegerImpl()
           
 
Method Summary
 void bindFc(String clientItfName, Object serverItf)
           
 Key generateKey(Message message)
          Generates a key for the given message.
 String[] listFc()
           
 
Methods inherited from class org.objectweb.dream.AbstractComponent
beforeFirstStart, getFcState, initComponent, lookupFc, setLogger, startFc, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_INTEGER_KEY

public static final KeyInteger ALL_INTEGER_KEY
The "All" Integer key.

Constructor Detail

KeyGeneratorIntegerImpl

public KeyGeneratorIntegerImpl()
Method Detail

generateKey

public Key generateKey(Message message)
                throws Exception
Description copied from interface: KeyGenerator
Generates a key for the given message. This method possibly adds a KeyChunk to the message.

Specified by:
generateKey in interface KeyGenerator
Parameters:
message - the message for which a key must be generated.
Returns:
the generated key.
Throws:
Exception - if this is not possible to generate a key (for instance when the generator try to add a Chunk to a non extensible message).
See Also:
KeyGenerator.generateKey(org.objectweb.dream.message.Message)

bindFc

public void bindFc(String clientItfName,
                   Object serverItf)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException
Specified by:
bindFc in interface BindingController
Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
See Also:
BindingController.bindFc(java.lang.String, java.lang.Object)

listFc

public String[] listFc()
Specified by:
listFc in interface BindingController
See Also:
BindingController.listFc()


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.