All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tlk.VirtualResourceID

java.lang.Object
   |
   +----jclass.TimedObject
           |
           +----tlk.VirtualResourceID

public class VirtualResourceID
extends TimedObject
implements Serializable
This class tries to identify each accessible object for a certain entity inside the system, that is to identify uniquely each resource accessible by any means from the perspective of a integrated active entity (service provider and/or requester).
This should include URL's, URN's etc. Hopefully IETF will come up with something standard & smart in a short time. We are proposing this.

A new element here would be to also introduce a datatype into each descriptor, thus typing each resource. In this frame, a datatype composition mechanism should be designed.

Note: A special issue to be considered is comparing two VirtualResourceID objects. Because of existing datatypes corresponding to each of them, the comparision should obviously include also the referenced datatypes. If those data types are identified by the same VirtualResourceID then this should be sufficient, otherwise, loading the data types and comparing them should be a part of the process !!!

NOT IMPLEMENTED FULLY

Written: Radu Sion
Version: 0.11
Source: VirtualResourceID.java

Visit Smart Software 


Variable Index

 o DAID
This particular value is used when referencing a DataAccess object.
 o DataAccessID
The virtual id of the expected data type (DataAccess) of the resource.
 o Host
The host on which the resource is to be found.
 o Name
The resource name.
 o Port
The port on which the resource is accessible.
 o Protocol
The protocol by which this resource is accessible.

Constructor Index

 o VirtualResourceID()
Fake constructor.
 o VirtualResourceID(EntityID)
Constructor.
 o VirtualResourceID(ServerID, String)
Constructor.
 o VirtualResourceID(String, long, String, String, VirtualResourceID)
Base Constructor.

Method Index

 o equals(Object)
Not implemented properly yet.
 o fromString(String)
Generates a VirtualResourceID object from a string provided in a form similar to the output of .toString().
 o hashCode()
We're implementing this in order to use properly hash facilities.
 o toString()
Returns the string representation of this object.

Variables

 o DAID
 public static VirtualResourceID DAID
This particular value is used when referencing a DataAccess object. (Which obviously should have no associated DataAccess type ;)

 o Host
 public String Host
The host on which the resource is to be found. We recomend to use inet addresses in 4 digit decimal 3 dot notation for this. (Ex. 193.226.143.17) If it's null then it should not be used.

 o Port
 public long Port
The port on which the resource is accessible. If 0 then it's the current server. If -1 then it is not used.

 o Protocol
 public String Protocol
The protocol by which this resource is accessible. ex: file, http, ftp, gopher, jvm, smtp, nntp etc.

 o Name
 public String Name
The resource name.

 o DataAccessID
 public VirtualResourceID DataAccessID
The virtual id of the expected data type (DataAccess) of the resource. If this field is null it means the referenced resource is a base java data type.

Note: In the case of referencing a data access object, this very field will be VirtualResourceID.VRT, that is, inside the DataAccessID object, the DataAccessID field should contain the value VirtualResourceID.DAID.

See Also:
DataAccess

Constructors

 o VirtualResourceID
 public VirtualResourceID(String host,
                          long port,
                          String protocol,
                          String name,
                          VirtualResourceID daid)
Base Constructor.

 o VirtualResourceID
 public VirtualResourceID(ServerID sid,
                          String name)
Constructor.

 o VirtualResourceID
 public VirtualResourceID(EntityID eid)
Constructor.

 o VirtualResourceID
 public VirtualResourceID()
Fake constructor.

Methods

 o toString
 public String toString()
Returns the string representation of this object. A valid representation should be "jvm://my.host.com:7007/name/eee.txt/||datatypevirtualresourceid||". The string is trimmed upon return. (no start/end spaces)

Overrides:
toString in class TimedObject
See Also:
toString
 o fromString
 public static VirtualResourceID fromString(String vridstr)
Generates a VirtualResourceID object from a string provided in a form similar to the output of .toString(). It also trims the string before parsing.

Returns:
null if error or notimplemented
 o equals
 public boolean equals(Object obj)
Not implemented properly yet. In this implementation we assume two VirtualResourceID objects are equal if they have equal representations returned by toString(). This of course is not entirely true ! See class introduction docs for info on comparing two VirtualResourceID objects ...

Overrides:
equals in class Object
See Also:
hashCode
 o hashCode
 public int hashCode()
We're implementing this in order to use properly hash facilities. In this implementation we just return the hashcode of the string representation of this object via toString().

Returns:
Returns 0 if some error occured
Overrides:
hashCode in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index