org.escot
Class Wire

java.lang.Object
  |
  +--org.escot.Wire
Direct Known Subclasses:
ActionControllerWire, AssociationWire, FunctionViewWire, ModelReplacementWire

public abstract class Wire
extends Object

Wire objects describe a connection from a feature of a publisher to a feature of a subscriber.


Field Summary
protected  Object mPublisher
           
protected  EscotFeature mPublisherFeature
           
protected  Object mSubscriber
           
protected  EscotFeature mSubscriberFeature
           
 
Constructor Summary
Wire()
           
Wire(Object publisher, EscotFeature publisherFeature, Object subscriber, EscotFeature subscriberFeature)
           
 
Method Summary
 EscotFeature _getPublisherFeature()
          Returns the publisher feature.
 EscotFeature _getSubscriberFeature()
          Returns the subscriber feature.
 void _setPublisherFeature(EscotFeature f)
          Establishes the PublisherFeature property.
 void _setSubscriberFeature(EscotFeature f)
          Establishes the SubscriberFeature property.
 void connect()
          Connects the publisher feature and subscriber feature.
 void disconnect()
          Disconnects the publisher feature and subscriber feature.
 Object getPublisher()
          Returns the publishing bean.
 EscotFeature getPublisherFeature()
          Deprecated. Use _getPublisherFeature() instead.
 String getPublisherFeatureID()
          Provides the string used to identify the particular PublisherFeature the wire is, or will be connected to.
 String getPublisherFeatureName()
          Returns the publisher feature name.
 Object getSubscriber()
          Returns the subscribing bean.
 EscotFeature getSubscriberFeature()
          Deprecated. Use _getPublisherFeature() instead.
 String getSubscriberFeatureID()
          Provides the string used to identify the particular receiver the wire is, or will be connected to.
 String getSubscriberFeatureName()
          Returns the subscriber feature name.
abstract  void handleConnect()
          Subclasses should override this method to implement wire-specific connection logic.
abstract  void handleDisconnect()
          Subclasses should override this method to implement wire-specific disconnection logic.
 boolean isConnected()
          Indicates whether or not the ends of the wire have been notified.
 void setPublisher(Object p)
           
 void setPublisherFeatureID(String id)
          Selects the PublisherFeature by id.
 void setSubscriber(Object s)
           
 void setSubscriberFeatureID(String id)
          Selects the publication receiver by id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mPublisher

protected Object mPublisher

mSubscriber

protected Object mSubscriber

mPublisherFeature

protected EscotFeature mPublisherFeature

mSubscriberFeature

protected EscotFeature mSubscriberFeature
Constructor Detail

Wire

public Wire(Object publisher,
            EscotFeature publisherFeature,
            Object subscriber,
            EscotFeature subscriberFeature)

Wire

public Wire()
Method Detail

setPublisher

public void setPublisher(Object p)

getPublisher

public Object getPublisher()
Returns the publishing bean.

_setPublisherFeature

public void _setPublisherFeature(EscotFeature f)
Establishes the PublisherFeature property. Note: The PublisherFeature property is transient (prefixed by "_", because the features are best created at dynamically at load time, rather restored as complete objects from an archiver file.

_getPublisherFeature

public EscotFeature _getPublisherFeature()
Returns the publisher feature. Note: The PublisherFeature property is transient (prefixed by "_", because the features are best created at dynamically at load time, rather restored as complete objects from an archiver file.

setPublisherFeatureID

public void setPublisherFeatureID(String id)
Selects the PublisherFeature by id. The actual PublisherFeature object is resolved at connection time.

getPublisherFeatureID

public String getPublisherFeatureID()
Provides the string used to identify the particular PublisherFeature the wire is, or will be connected to.

setSubscriber

public void setSubscriber(Object s)

getSubscriber

public Object getSubscriber()
Returns the subscribing bean.

_setSubscriberFeature

public void _setSubscriberFeature(EscotFeature f)
Establishes the SubscriberFeature property. Note: The PublisherFeature property is transient (prefixed by "_", because the features are best created at dynamically at load time, rather restored as complete objects from an archiver file.

_getSubscriberFeature

public EscotFeature _getSubscriberFeature()
Returns the subscriber feature. Note: The SubscriberFeature property is transient (prefixed by "_", because the features are best created at dynamically at load time, rather restored as complete objects from an archiver file.

setSubscriberFeatureID

public void setSubscriberFeatureID(String id)
Selects the publication receiver by id. The actual receiver object is resolved at connection time.

getSubscriberFeatureID

public String getSubscriberFeatureID()
Provides the string used to identify the particular receiver the wire is, or will be connected to.

connect

public void connect()
Connects the publisher feature and subscriber feature.

disconnect

public void disconnect()
Disconnects the publisher feature and subscriber feature.

isConnected

public boolean isConnected()
Indicates whether or not the ends of the wire have been notified.

handleConnect

public abstract void handleConnect()
Subclasses should override this method to implement wire-specific connection logic.

handleDisconnect

public abstract void handleDisconnect()
Subclasses should override this method to implement wire-specific disconnection logic.

getPublisherFeatureName

public String getPublisherFeatureName()
Returns the publisher feature name.

getSubscriberFeatureName

public String getSubscriberFeatureName()
Returns the subscriber feature name.

getPublisherFeature

public EscotFeature getPublisherFeature()
Deprecated. Use _getPublisherFeature() instead.

Returns the publisher feature.

getSubscriberFeature

public EscotFeature getSubscriberFeature()
Deprecated. Use _getPublisherFeature() instead.

Returns the subscriber feature.