Package net.jini.core.lookup

Examples of net.jini.core.lookup.ServiceTemplate


  proxy = super.getProxy();
  exactClassTmpls = new ServiceTemplate[nClasses];
  for(int i=0; i<nClasses; i++) {
      Class c = Class.forName(TEST_SRVC_CLASSES[i]);
      Class[] exactClassType = {c};
      exactClassTmpls[i] = new ServiceTemplate(null,
                 exactClassType,null);
  }
    }
View Full Code Here


     @exception TestException usually indicates a failure
     */
    public static void verifyEventItems(Vector eventVector)
  throws Exception
    {
  ServiceTemplate tmpl = new ServiceTemplate(null, null, null);
    outer:
  for (int i = 0; i < eventVector.size(); i++) {
      ServiceEvent evnt = (ServiceEvent)eventVector.elementAt(i);
      for (int j = i + 1; j < eventVector.size(); j++) {
    ServiceEvent oevnt = (ServiceEvent)eventVector.elementAt(j);
View Full Code Here

        Vector srvcSupers = new Vector();
  int s0 = getSrvcIndx(srvcObj,srvcItems);
  int nAttrs = preEventState[0].length;
  int trans;
  int newSrvcIndx;
  ServiceTemplate srvcTmpl;
  for(j=0;j<nAttrs;j++) {
      srvcTmpl = template[s0/nSrvcsPerClass][j];
      for(i=0;i<(srvcTmpl.serviceTypes).length;i++) {
    tmplTuple = new SrvcAttrTuple
        ( srvcsForEquals,attrs,
View Full Code Here

      for (j=1,exit_loop=false;
     ((exit_loop==false)&&(j<maxChainLen));j++) {
    sClass[j] = sClass[j-1].getSuperclass();
    if ( !sClass[j].isAssignableFrom(Object.class) ) {
        Class[] superClassType = {sClass[j]};
        superClassTmpls[i][j] = new ServiceTemplate
      (null,superClassType,null);
    } else {
        exit_loop = true;
        chainLen[i] = j;
    }
View Full Code Here

  proxy = super.getProxy();
  srvcIDTmpl = new ServiceTemplate[srvcRegs.length];
  evntRegs = new EventRegistration[srvcRegs.length];
        for (i=0;i<srvcRegs.length;i++) {
            curSrvcID = srvcRegs[i].getServiceID();
            srvcIDTmpl[i] = new ServiceTemplate(curSrvcID,null,null);
      EventRegistration er;
      er = proxy.notify(srvcIDTmpl[i], regTransitions, listener,
            new MarshalledObject(curSrvcID),
            Long.MAX_VALUE);
      evntRegs[i] = prepareEventRegistration(er);
View Full Code Here

  for(i=0; i<srvcLeases.length; i++) {
      srvcLeases[i] = getRegistrationLease(srvcRegs[i]);
  }
  for(i=0; i<srvcIDTmpls.length; i++) {
      srvcIDTmpls[i] = new ServiceTemplate(srvcRegs[i].getServiceID(),
                                                 null,null);
  }
   evntRegs = new EventRegistration[nInstances];
  evntLeases = new Lease[nInstances];
  registerAllEvents();
View Full Code Here

*/
public class NotifyBadTransition extends NotifyExceptionTest {

    public void run() throws Exception {
  try {
      getProxy().notify(new ServiceTemplate(null, null, null),
            1<<5, listener, null, Long.MAX_VALUE);
      throw new TestException("notify did not "
          + "throw IllegalArgumentException");
  } catch (IllegalArgumentException e) {
  }
View Full Code Here

*/
public class LookupNoMatch extends QATestRegistrar {

    public void run() throws Exception {
  Class[] types = {LookupNoMatch.class};
  Object val = getProxy().lookup(new ServiceTemplate(null, types, null));
  if (val != null)
      throw new TestException("lookup did not return null");
    }
View Full Code Here

  for(i=0; i<srvcLeases.length; i++) {
      srvcLeases[i] = getRegistrationLease(srvcRegs[i]);
  }
  for(i=0; i<srvcIDTmpls.length; i++) {
      srvcIDTmpls[i] = new ServiceTemplate(srvcRegs[i].getServiceID(),
                                                 null,null);
  }
   evntRegs = new EventRegistration[nInstances];
  evntLeases = new Lease[nInstances];
  registerAllEvents();
View Full Code Here

*/
public class GetFieldValuesBadIndex extends QATestRegistrar {

    public void run() throws Exception {
  try {
      getProxy().getFieldValues(new ServiceTemplate(null, null,
                new Entry[0]),
              1, "foo");
      throw new TestException("getFieldValues did not "
          + "throw IndexOutOfBoundsException");
  } catch (IndexOutOfBoundsException e) {
View Full Code Here

TOP

Related Classes of net.jini.core.lookup.ServiceTemplate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.