void register(ObjectInputValidation obj,int priority) throws InvalidObjectException {
  if (obj == null) {
    throw new InvalidObjectException("null callback");
  }
  Callback prev=null, cur=list;
  while (cur != null && priority < cur.priority) {
    prev=cur;
    cur=cur.next;
  }
  AccessControlContext acc=AccessController.getContext();
  if (prev != null) {
    prev.next=new Callback(obj,priority,cur,acc);
  }
 else {
    list=new Callback(obj,priority,list,acc);
  }
}

void register ( ObjectInputValidation obj , int priority ) throws InvalidObjectException { if ( obj == null ) { throw new InvalidObjectException ( "null callback" ) ; } Callback prev = null , cur = list ; while ( cur != null && priority < cur . priority ) { prev = cur ; cur = cur . next ; } AccessControlContext acc = AccessController . getContext ( ) ; if ( prev != null ) { prev . next = new Callback ( obj , priority , cur , acc ) ; } else { list = new Callback ( obj , priority , list , acc ) ; } }
registers callback . throws invalidobjectexception if callback object is null .
