|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object context.arch.subscriber.AbstractSubscriber
Interface for Subscriber classes that may be stored in a Subscribers object. A subscriber is defined by: id+hostname+port. It specifies a callback name it subscribes to and a tag (subscriber tag as alias for the callback).
Field Summary | |
static java.lang.String |
ADD_SUBSCRIBER
Tag to indicate message is for adding a subscriber |
static java.lang.String |
CALLBACK_NAME
Tag for callback (on widget side) |
static java.lang.String |
CALLBACK_TAG
Tag for callback tag (on subscriber side) |
static java.lang.String |
CLIENT_BASEOBJECT_ID
Tag for the client side BaseObject id |
static java.lang.String |
HOSTNAME
Tag for host machine of component |
static int |
MAX_ERRORS
Maximum number of consecutive communication errors to be tolerated |
static java.lang.String |
PORT
Tag for port number of component |
static java.lang.String |
REMOVE_SUBSCRIBER
Tag to indicate message is for removing a subscriber |
static java.lang.String |
SUBSCRIBER
Tag for a subscriber |
static java.lang.String |
SUBSCRIBER_ID
Tag for subscription id |
static java.lang.String |
SUBSCRIBER_TYPE
Tag for subscriber type |
static java.lang.String |
SUBSCRIPTION_CALLBACK
Tag to indicate message is a subscription callback |
static java.lang.String |
SUBSCRIPTION_CALLBACK_REPLY
Tag to indicate message is the reply to a subscription callback message |
static java.lang.String |
SUBSCRIPTION_REPLY
Tag to indicate message is a subscription reply |
Constructor Summary | |
AbstractSubscriber(DataObject data)
Basic constructor that creates a subscriber object from a DataObject. |
|
AbstractSubscriber(java.lang.String subscriberType)
|
Method Summary | |
void |
addError()
Increment the error counter |
static AbstractSubscriber |
dataObjectToAbstractSubscriber(DataObject data)
This method return a Subscriber object based on the type specified in the SUBSCRIBER tag. |
java.lang.String |
getBaseObjectId()
|
int |
getErrors()
Returns the number of consecutive errors in trying to communicate with this subscriber |
java.lang.String |
getSubscriberHostName()
Returns the name of the subscriber's host computer |
int |
getSubscriberPort()
Returns the port number to send info to |
java.lang.String |
getSubscriptionCallback()
Returns the subscriber callback that the subscriber registered |
java.lang.String |
getSubscriptionId()
Returns the id of the subscriber |
void |
resetErrors()
Reset the error counter |
protected void |
setBaseObjectId(java.lang.String id)
|
void |
setSubscriberHostname(java.lang.String subHostname)
Sets the name of the subscriber's host computer |
void |
setSubscriberPort(int subPort)
Sets the port number to send info to |
void |
setSubscriptionCallback(java.lang.String subscriptionCallback)
Sets the subscriber callback that the subscriber wants to register for |
void |
setSubscriptionId(java.lang.String id)
Sets the id of the subscriber |
DataObject |
toDataObject()
This method converts the subscriber info to a DataObject |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String SUBSCRIBER
public static final java.lang.String HOSTNAME
public static final java.lang.String PORT
public static final java.lang.String SUBSCRIBER_ID
public static final java.lang.String CLIENT_BASEOBJECT_ID
public static final java.lang.String SUBSCRIPTION_REPLY
public static final java.lang.String CALLBACK_TAG
public static final java.lang.String CALLBACK_NAME
public static final java.lang.String SUBSCRIPTION_CALLBACK
public static final java.lang.String ADD_SUBSCRIBER
public static final java.lang.String REMOVE_SUBSCRIBER
public static final java.lang.String SUBSCRIPTION_CALLBACK_REPLY
public static final java.lang.String SUBSCRIBER_TYPE
public static final int MAX_ERRORS
Constructor Detail |
public AbstractSubscriber(java.lang.String subscriberType)
public AbstractSubscriber(DataObject data)
data
- DataObject containing the subscriber infoMethod Detail |
public static AbstractSubscriber dataObjectToAbstractSubscriber(DataObject data)
data
- DataObject containing the subscriber infopublic java.lang.String getSubscriptionId()
public void setSubscriptionId(java.lang.String id)
id
- ID of the subscriberpublic java.lang.String getSubscriberHostName()
public void setSubscriberHostname(java.lang.String subHostname)
public int getSubscriberPort()
public void setSubscriberPort(int subPort)
public java.lang.String getSubscriptionCallback()
public void setSubscriptionCallback(java.lang.String subscriptionCallback)
public void addError()
public void resetErrors()
public int getErrors()
public DataObject toDataObject()
public java.lang.String getBaseObjectId()
protected void setBaseObjectId(java.lang.String id)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |