Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

proxy.jmsapi
Class ProxyStoredObject  view ProxyStoredObject download ProxyStoredObject.java

java.lang.Object
  extended byproxy.jmsapi.ProxyStoredObject
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
JMSConnection, JMSConnectionFactory, JMSConsumer, JMSDestination, JMSMessage, JMSProducer, JMSSession, JNDIObject

public abstract class ProxyStoredObject
extends java.lang.Object
implements java.lang.Comparable

abstract class representing a container which stores one real JMS specific object virtually created on some mobile.


Field Summary
private static int currentId
          variable used to generate unique ids.
 int id
           a unique identifier
 int mobile
           a id of a mobile on which encapsulated object was virtually created
private  java.lang.Object Obj
           an encapsulated object stored on proxyServer
 int owner
           a id of a aplication that requested creating an encapsulated object
 int type
          idicates type of the encapsulated object
 
Constructor Summary
ProxyStoredObject()
           
ProxyStoredObject(int _owner, int _mobile)
           
 
Method Summary
 int compare(java.lang.Object obj)
           
 int compareTo(java.lang.Object obj)
          Compares this object with another, and returns a numerical result based on the comparison.
 int getNextId()
           returns new unique id among all objects of this class.
 java.lang.Object getObj()
           get an encapsulated object
 void setObj(java.lang.Object _Obj)
           set an encapsulated object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentId

private static int currentId
variable used to generate unique ids. Its value means first free id to be used.


type

public int type
idicates type of the encapsulated object


id

public int id

a unique identifier


owner

public int owner

a id of a aplication that requested creating an encapsulated object


mobile

public int mobile

a id of a mobile on which encapsulated object was virtually created


Obj

private java.lang.Object Obj

an encapsulated object stored on proxyServer

Constructor Detail

ProxyStoredObject

public ProxyStoredObject()

ProxyStoredObject

public ProxyStoredObject(int _owner,
                         int _mobile)
Method Detail

getObj

public java.lang.Object getObj()

get an encapsulated object


setObj

public void setObj(java.lang.Object _Obj)

set an encapsulated object


getNextId

public int getNextId()

returns new unique id among all objects of this class.


compareTo

public int compareTo(java.lang.Object obj)
Description copied from interface: java.lang.Comparable
Compares this object with another, and returns a numerical result based on the comparison. If the result is negative, this object sorts less than the other; if 0, the two are equal, and if positive, this object sorts greater than the other. To translate this into boolean, simply perform o1.compareTo(o2) <op> 0, where op is one of <, <=, =, !=, >, or >=.

You must make sure that the comparison is mutual, ie. sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) (where sgn() is defined as -1, 0, or 1 based on the sign). This includes throwing an exception in either direction if the two are not comparable; hence, compareTo(null) should always throw an Exception.

You should also ensure transitivity, in two forms: x.compareTo(y) > 0 && y.compareTo(z) > 0 implies x.compareTo(z) > 0; and x.compareTo(y) == 0 implies x.compareTo(z) == y.compareTo(z).

Specified by:
compareTo in interface java.lang.Comparable

compare

public int compare(java.lang.Object obj)