org.neo.swarm.services.binding
Class StaticRunnable

java.lang.Object
  extended byorg.neo.swarm.services.binding.DynamicRunnable
      extended byorg.neo.swarm.services.binding.StaticRunnable
All Implemented Interfaces:
BindingRunnable, java.lang.Runnable, Service, org.picocontainer.Startable

public class StaticRunnable
extends DynamicRunnable

Maintains a list of addresses and iterates over each entry, sending the serialized registration aspect to each entry.

Author:
navery
See Also:
DynamicRunnable, BindingService

Field Summary
 
Fields inherited from class org.neo.swarm.services.binding.DynamicRunnable
sendData
 
Constructor Summary
StaticRunnable(ApplicationContext appContext, Sender sender, Serializer serializer, int timeout)
           
 
Method Summary
 void addLocation(java.net.InetAddress address, int port)
          Adds new address location..
 void run()
          Overloads send method with a tcpClient version that uses blocking sockets to iterate over a list of address/port sets.
 
Methods inherited from class org.neo.swarm.services.binding.DynamicRunnable
getName, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticRunnable

public StaticRunnable(ApplicationContext appContext,
                      Sender sender,
                      Serializer serializer,
                      int timeout)
Method Detail

run

public void run()
Overloads send method with a tcpClient version that uses blocking sockets to iterate over a list of address/port sets. TODO: collapse this into dynamicRunnable as the sender API is slightly different.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class DynamicRunnable

addLocation

public void addLocation(java.net.InetAddress address,
                        int port)
Adds new address location..

Specified by:
addLocation in interface BindingRunnable
Overrides:
addLocation in class DynamicRunnable


Copyright © 2001-2004 SWARM-ONE -First Generation (S)calable(W)ide(AR)ea(M)esh. All Rights Reserved.