| java.lang.Object org.datashare.objects.DefaultObjectInfo
All known Subclasses: org.datashare.ClientInfo, org.datashare.ConsumerInfo, org.datashare.ChannelInfo, org.datashare.SessionInfo,
DefaultObjectInfo | public class DefaultObjectInfo implements DSObjectInfoInterface,java.io.Serializable(Code) | | this class is used to convert the ClientInfo, ChannelInfo, SessionInfo, and ConsumerInfo
classes into a class that is serializable, and common for processing on the recieving end.
Note that DefaultObjectInfo instances are only created on the Server then sent to clients.
author: Charles Wood version: 1.0 |
Field Summary | |
protected boolean | active | protected String | clientClass | protected String | clientRealName Used to hold the real name of a user, i.e. | protected String | databaseID contains the database key String for this instance, populated only when the Server is saving
data for this type. | protected Date | date | protected String | grandparentKeyValue represents the grandparent instance's keyValue, used only when this instance
represents a Consumer. | protected String | imageURL | protected String | infoString | protected boolean | keyHasBeenReturned Used only if the server is creating/using EJBs, true indicates that the EJB was
created and the setDatabaseID method has been called in this instance with the EJB's
key value. | protected String | keyValue the String value to use for this instance in a Hashtable. | protected String | name | protected String | originalType this is used to indicate what type this object should represent. | protected String | ownerName | protected String | parentKeyValue represents the parent instance's keyValue, used only for Channels and Consumers. | protected boolean | privateOnly use depends on which object it is being applied to. | final static long | serialVersionUID this allows us to serialize this class without 'marshalling' errors. | protected String | toString this is the string that is displayed in the Jtree for this instance,
this must be set for every instance. | protected boolean | waitingForKey Used only if the server is creating/using EJBs, true indicates an EJB create was
requested and we are waiting for it's key value to be returned, false otherwise. |
Method Summary | |
public boolean | getActive() | public String | getClientClass() | public String | getClientRealName() | public String | getDatabaseID() | public Date | getDate() | public String | getGrandParentKeyValue() the value to use for the key of this instances grandparent's keyValue. | public String | getImageURL() | public String | getInfo() Retrieves a description of this instance. | public String | getKeyValue() the value to use for the key for this instance in a Hashtable of
these instances (care must be taken to ensure keys are unique in the Hashtable):
the String used in the constructor is used as the key here. | public String | getName() Retrieves the unique name of this instance. | public Object | getObject() Retrieves an Object reference of this instance, used when this class
is cast to the parent class for common handling of JSDTObjectInfo objects. | public String | getOriginalType() Retrieves a string containing the original type of object that is represented by this instance. | public String | getOwnerName() | public String | getParentKeyValue() the value to use for the key of this instances parent's keyValue. | public boolean | getPrivate() | public String | getType() Retrieves a string containing 'DefaultObjectInfo'. | public String | retrieveEJB() | public void | setActive(boolean active) | public void | setDatabaseID(String ak) Sets the ADSKey String for this instance to the provided parameter value. | public void | setInfo(String infoString) Sets the value that is used to hold detailed information about this instance. | public void | setKeyHasBeenReturned(boolean value) Used to set the value that represents if the EJB has been created and it's
corresponding ADSKey String value set into the invoking class via the setEjbId() method. | public void | setKeyValue(String keyValue) | public void | setWaitingForKey(boolean value) Indicates the status of the EJB that was requested to be created: this method
is called with a true value while we are waiting for the EJB to be created, and
set to false after the EJB has been created and it's ADSKey String value has been
returned via the setADSKey method. | public String | toString() |
active | protected boolean active(Code) | | flag to indicate if this instance is currently active in the JSDT Registry
|
clientClass | protected String clientClass(Code) | | indicates the class of the client for this object
|
clientRealName | protected String clientRealName(Code) | | Used to hold the real name of a user, i.e. 'Chuck Wood', valid only for Client/Consumers
|
databaseID | protected String databaseID(Code) | | contains the database key String for this instance, populated only when the Server is saving
data for this type. Note that this value may contain null even if data is saved (if the
server has problems saving the data, or has not yet determined this key value)
|
date | protected Date date(Code) | | when this instance was created
|
grandparentKeyValue | protected String grandparentKeyValue(Code) | | represents the grandparent instance's keyValue, used only when this instance
represents a Consumer. In that case, the parentKeyValue is set to its Channel
and the grandparentKeyValue is set to the Session. This is because the keyValue
for a Channel is not enough to find the Channel unless you also know the Session.
|
imageURL | protected String imageURL(Code) | | Used to hold the URL for the image of Client/Consumers
|
infoString | protected String infoString(Code) | | the String that should be displayed when the detailed information about this
instance is desired
|
keyHasBeenReturned | protected boolean keyHasBeenReturned(Code) | | Used only if the server is creating/using EJBs, true indicates that the EJB was
created and the setDatabaseID method has been called in this instance with the EJB's
key value. It is set to false if EJBs are not used and also if EJBs are used,
but the ADSKey String for the EJB has not yet been returned.
|
keyValue | protected String keyValue(Code) | | the String value to use for this instance in a Hashtable. Must be unique for the
context in which it is used:
i.e. for ChannelInfo the keyValue must be unique in the Session,
for SessionInfo the keyValue must be unique for all active Sessions,
for ClientInfo the keyValue must be unique for each Client instance (Java VM) the Client is using,
for ConsumerInfo the keyValue must match it's corresponding ClientInfo value and must
be unique within the Channel.
|
name | protected String name(Code) | | the name used to refer to this unique instance
|
originalType | protected String originalType(Code) | | this is used to indicate what type this object should represent. It is especially
useful when a SessionInfo has been pared-down to a DefaultObjectInfo so it can
be serialized. The fact that a DefaultObjectInfo is now representing what was
a SessionInfo is maintained in this attribute. In the example case, this attribute
would be set to 'sessionType'
|
ownerName | protected String ownerName(Code) | | the Owner name string, used only for Sessions and Channels
|
parentKeyValue | protected String parentKeyValue(Code) | | represents the parent instance's keyValue, used only for Channels and Consumers.
For Channels, the parent is it's Session, for Consumers it is the Channel it is in.
|
privateOnly | protected boolean privateOnly(Code) | | use depends on which object it is being applied to. Currently used only for Sessions/SessionInfo
|
serialVersionUID | final static long serialVersionUID(Code) | | this allows us to serialize this class without 'marshalling' errors.
|
toString | protected String toString(Code) | | this is the string that is displayed in the Jtree for this instance,
this must be set for every instance.
|
waitingForKey | protected boolean waitingForKey(Code) | | Used only if the server is creating/using EJBs, true indicates an EJB create was
requested and we are waiting for it's key value to be returned, false otherwise.
|
DefaultObjectInfo | protected DefaultObjectInfo()(Code) | | Empty Class constructor
|
DefaultObjectInfo | public DefaultObjectInfo(String name, String type, String infoString)(Code) | | Class constructor with name of instance specified. Used for nodes that are not associated with
any specific client or session
Parameters: name - instance name |
DefaultObjectInfo | public DefaultObjectInfo(String name, String type, String clientClass, String infoString)(Code) | | Class constructor with name of instance specified. Used when the node is associated with a
client or session.
Parameters: name - instance name |
getActive | public boolean getActive()(Code) | | Retrieves the active flag
true if this instance is currently active in the JSDT Registry |
getClientClass | public String getClientClass()(Code) | | Retrieves the clientClass for this object
|
getClientRealName | public String getClientRealName()(Code) | | returns the client's real name, if available, empty string otherwise
|
getDatabaseID | public String getDatabaseID()(Code) | | Retrieves the ADSKey string for this Instance
the instance's databaseID |
getDate | public Date getDate()(Code) | | Retrieves when this instance was created
the time this instance was created (first put into the JSDTRegistry) |
getGrandParentKeyValue | public String getGrandParentKeyValue()(Code) | | the value to use for the key of this instances grandparent's keyValue.
the value to use as the key for this instances grandparent in aHashtable |
getImageURL | public String getImageURL()(Code) | | returns the URL for the image of a user, probably valid only if this instance refers to a Client/Consumer
|
getInfo | public String getInfo()(Code) | | Retrieves a description of this instance.
the infoString for this instance which should contain detailedinformation about this instance; returns the name of this instance ifinfoString is null |
getKeyValue | public String getKeyValue()(Code) | | the value to use for the key for this instance in a Hashtable of
these instances (care must be taken to ensure keys are unique in the Hashtable):
the String used in the constructor is used as the key here.
the value to use as the key for this instance in a Hashtable |
getName | public String getName()(Code) | | Retrieves the unique name of this instance.
the instance's name |
getObject | public Object getObject()(Code) | | Retrieves an Object reference of this instance, used when this class
is cast to the parent class for common handling of JSDTObjectInfo objects.
the DefaultObjectInfo instance as an Object |
getOriginalType | public String getOriginalType()(Code) | | Retrieves a string containing the original type of object that is represented by this instance.
value of originalType for this instance |
getOwnerName | public String getOwnerName()(Code) | | Retrieves the Creator/Owner name for this instance, used only for Sessions and Channels
this instance's owner/creator name |
getParentKeyValue | public String getParentKeyValue()(Code) | | the value to use for the key of this instances parent's keyValue.
the value to use as the key for this instances parent in aHashtable |
getPrivate | public boolean getPrivate()(Code) | | returns the value that was set by the original object, use is specific to the
original type of object this instance was created from
|
getType | public String getType()(Code) | | Retrieves a string containing 'DefaultObjectInfo'.
fixed value of 'DefaultObjectInfo' for all instances, used whenthis class is referenced by it's parent class so all subclasses have acommon method that can be used to test for the instance type. |
retrieveEJB | public String retrieveEJB()(Code) | | Waits for the container to return the EJB String ID, or returns null if we have waited long enough
|
setActive | public void setActive(boolean active)(Code) | | sets the active flag for this instance to the specified value
Parameters: active - value to set active flag to |
setDatabaseID | public void setDatabaseID(String ak)(Code) | | Sets the ADSKey String for this instance to the provided parameter value.
The ADSKey String is the value provided when the EJB was created for this instance.
Parameters: ak - the value to save as the ID for this instance |
setInfo | public void setInfo(String infoString)(Code) | | Sets the value that is used to hold detailed information about this instance.
Parameters: infoString - the detailed information about this instance. |
setKeyHasBeenReturned | public void setKeyHasBeenReturned(boolean value)(Code) | | Used to set the value that represents if the EJB has been created and it's
corresponding ADSKey String value set into the invoking class via the setEjbId() method.
This method is used only if EJBs are being used/created.
Parameters: value - true if the ADSKey String has been returned, false if weare still waiting |
setKeyValue | public void setKeyValue(String keyValue)(Code) | | Sets the value to use for the key for this instance in a Hashtable of
these instances (care must be taken to ensure keys are unique in the Hashtable)
Parameters: keyValue - value to use as the key in a Hashtable for this instance |
setWaitingForKey | public void setWaitingForKey(boolean value)(Code) | | Indicates the status of the EJB that was requested to be created: this method
is called with a true value while we are waiting for the EJB to be created, and
set to false after the EJB has been created and it's ADSKey String value has been
returned via the setADSKey method. Note that to truly determine if the ADSKey
value has been completed, this method will return a false and the method
getKeyHasBeenReturned will return true. This method is used only if EJBs are
being used/created.
Parameters: value - true if the EJB has not been completed, false otherwise. |
toString | public String toString()(Code) | | Retrieves the string to use for the JTree display of this instance
the instance's name |
|
|