things.thinger.io.conduits
Interface Conduit

All Known Implementing Classes:
BasicConduit

public interface Conduit

Interface to a conduit.

Drains are registered and deregistered. Push drains will call the drain object from a system owned Thread. Pull drains are polled from outside the system Threads.

Version:
1.0

Version History

EPG - Adapted from autohit - 28 JUN 05
 
Author:
Erich P. Gatejen

Nested Class Summary
static class Conduit.InjectorType
          The InjectorType specifies how it will behave, as follows:
UNSPECIFIED: No preference.
 
Field Summary
static Nubblet NOTHING
          A nothing nubblet is the same as a null.
 
Method Summary
 void deRegisterPullDrain(PullDrainContainer theDrain)
          Deregister a PullDrainContainer instance with the Conduit.
 void deRegisterPushDrain(PushDrain theDrain)
          Deregister a PushDrain instance with the Conduit.
 void disposeInjector(Injector theInjector)
          Explicitly dispose of an Injector.
 ConduitID getId()
          Get the id.
 Injector getInjector(Conduit.InjectorType theType)
          This will get an injector to the conduit.
 Injector getInjector(Conduit.InjectorType theType, java.lang.String name)
          This will get an injector to the conduit, named.
 void init(ConduitID yourId)
          Initialize the Conduit.
 void registerPullDrain(PullDrainContainer theDrain)
          Register a PullDrainContainer instance with the Conduit.
 void registerPushDrain(PushDrain theDrain)
          Register a PushDrain instance with the Conduit.
 

Field Detail

NOTHING

static final Nubblet NOTHING
A nothing nubblet is the same as a null.

Method Detail

init

void init(ConduitID yourId)
          throws SystemException
Initialize the Conduit. This will be called by it's controller. An subsequent calls may result in a PANIC SystemException. Don't do it!

Parameters:
yourId - The ConduitID.
Throws:
SystemException
See Also:
ConduitID

getId

ConduitID getId()
Get the id. This will be as the local system sees it. It cannot be otherwise transported to another system and used as is.

Returns:
The Conduit ID.

getInjector

Injector getInjector(Conduit.InjectorType theType)
                     throws SystemException
This will get an injector to the conduit.

Parameters:
theType - The type of injector to get. If the underlying implementation does not support that type, it should throw a ThingsException.
Returns:
An injector.
Throws:
SystemException

getInjector

Injector getInjector(Conduit.InjectorType theType,
                     java.lang.String name)
                     throws SystemException
This will get an injector to the conduit, named.

Parameters:
theType - The type of injector to get. If the underlying implementation does not support that type, it should throw a ThingsException.
name - the name of the Injector.
Returns:
An injector.
Throws:
SystemException

disposeInjector

void disposeInjector(Injector theInjector)
                     throws SystemException
Explicitly dispose of an Injector.

Parameters:
theInjector - The Injector object to dispose.
Throws:
SystemException

registerPullDrain

void registerPullDrain(PullDrainContainer theDrain)
                       throws SystemException
Register a PullDrainContainer instance with the Conduit.

Parameters:
theDrain - The drain to register.
Throws:
SystemException
See Also:
PullDrainContainer

deRegisterPullDrain

void deRegisterPullDrain(PullDrainContainer theDrain)
                         throws SystemException
Deregister a PullDrainContainer instance with the Conduit. This will not empty any queued items.

Parameters:
theDrain - The drain to deregister.
Throws:
SystemException
See Also:
PullDrainContainer

registerPushDrain

void registerPushDrain(PushDrain theDrain)
                       throws SystemException
Register a PushDrain instance with the Conduit. It may be immeadiately subject to pushed items.

Parameters:
theDrain - The drain to register.
Throws:
SystemException
See Also:
PushDrain

deRegisterPushDrain

void deRegisterPushDrain(PushDrain theDrain)
                         throws SystemException
Deregister a PushDrain instance with the Conduit. If the Conduit is in the middle of a push, it may block this call until done.

Parameters:
theDrain - The drain to deregister.
Throws:
SystemException
See Also:
PushDrain


Things.