Openwings API Documentation (v1.1)

net.openwings.connector
Class Connector

java.lang.Object
  extended bynet.openwings.connector.Connector
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AsynchronousConnector, SynchronousConnector

public abstract class Connector
extends java.lang.Object
implements java.io.Serializable

This class holds the ReceiverProxy and SenderProxy that make up an Openwings connector. The proxies are loaded by this class's loadProxies() method.

The Connector interface should only be used in cases where synchronicity is irrelevant. That is, this interface should not be used in cases where a standard blocking (or non-blocking) behavior is required for one or more methods implemented by the ReceiverProxy or SenderProxy. If such behavior is required, then a choice should be made between an AsynchronousConnector or a SynchronousConnector as appropriate.

See Also:
ReceiverProxy, SenderProxy, AsynchronousConnector, SynchronousConnector, Serialized Form

Field Summary
protected  ProtocolAttributes attributes
          This field contains any protocol-specific information used to configure the connector.
protected  ReceiverProxy receiverProxy
          This field contains all of the business logic required to recieve calls from a SenderProxy and relay it to a reciever object.
protected  SenderProxy senderProxy
          This field contains all of the business logic required for a sender object to make seamless calls to a reciever object.
 
Constructor Summary
Connector()
          This default constructor calls the loadProxies() method.
Connector(ProtocolAttributes attributes)
          This constructor sets protocol-specific attributes and then calls the loadProxies() method.
 
Method Summary
 ProtocolAttributes getProtocolAttributes()
          This method returns the ProtocolAttributes of this connector.
static java.lang.Class getProtocolAttributesClass()
          This method returns the type of ProtocolAttributes object used to instantiate this connector.
 ReceiverProxy getReceiverProxy()
          This method returns the ReceiverProxy of this connector.
 SenderProxy getSenderProxy()
          This method returns the SenderProxy of this connector.
protected abstract  void loadProxies()
          This method populates the senderProxy and receiverProxy fields of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

receiverProxy

protected ReceiverProxy receiverProxy
This field contains all of the business logic required to recieve calls from a SenderProxy and relay it to a reciever object.


senderProxy

protected SenderProxy senderProxy
This field contains all of the business logic required for a sender object to make seamless calls to a reciever object. This must also contain a protocol specific mechanism for communicating to a ReceiverProxy.


attributes

protected ProtocolAttributes attributes
This field contains any protocol-specific information used to configure the connector.

Constructor Detail

Connector

public Connector()
This default constructor calls the loadProxies() method.


Connector

public Connector(ProtocolAttributes attributes)
This constructor sets protocol-specific attributes and then calls the loadProxies() method.

Parameters:
attributes - protocol-specific attributes for this connection
Method Detail

loadProxies

protected abstract void loadProxies()
This method populates the senderProxy and receiverProxy fields of this class. It should also handle any default initialization between the proxies, so that they are ready for use.


getReceiverProxy

public ReceiverProxy getReceiverProxy()
This method returns the ReceiverProxy of this connector.

Returns:
the ReceiverProxy of this connector.

getSenderProxy

public SenderProxy getSenderProxy()
This method returns the SenderProxy of this connector.

Returns:
the SenderProxy of this connector.

getProtocolAttributes

public ProtocolAttributes getProtocolAttributes()
This method returns the ProtocolAttributes of this connector.

Returns:
the ProtocolAttributes of this connector.

getProtocolAttributesClass

public static java.lang.Class getProtocolAttributesClass()
This method returns the type of ProtocolAttributes object used to instantiate this connector. This method is intended to be overriden by subclasses that override the Connector(ProtocolAttributes) constructor.

Returns:
type of ProtocolAttributes object, defaults to null

Openwings API Documentation (v1.1)