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
-
DAID
- This particular value is used when referencing a DataAccess object.
-
DataAccessID
- The virtual id of the expected data type (DataAccess) of the resource.
-
Host
- The host on which the resource is to be found.
-
Name
- The resource name.
-
Port
- The port on which the resource is accessible.
-
Protocol
- The protocol by which this resource is accessible.
-
VirtualResourceID()
- Fake constructor.
-
VirtualResourceID(EntityID)
- Constructor.
-
VirtualResourceID(ServerID, String)
- Constructor.
-
VirtualResourceID(String, long, String, String, VirtualResourceID)
- Base Constructor.
-
equals(Object)
- Not implemented properly yet.
-
fromString(String)
- Generates a VirtualResourceID object from a string provided in a form
similar to the output of .toString().
-
hashCode()
- We're implementing this in order to use properly hash facilities.
-
toString()
- Returns the string representation of this object.
DAID
public static VirtualResourceID DAID
- This particular value is used when referencing a DataAccess object.
(Which obviously should have no associated DataAccess type ;)
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.
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.
Protocol
public String Protocol
- The protocol by which this resource is accessible.
ex: file, http, ftp, gopher, jvm, smtp, nntp etc.
Name
public String Name
- The resource name.
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
VirtualResourceID
public VirtualResourceID(String host,
long port,
String protocol,
String name,
VirtualResourceID daid)
- Base Constructor.
VirtualResourceID
public VirtualResourceID(ServerID sid,
String name)
- Constructor.
VirtualResourceID
public VirtualResourceID(EntityID eid)
- Constructor.
VirtualResourceID
public VirtualResourceID()
- Fake constructor.
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
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
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
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