Package net.jini.core.entry

Examples of net.jini.core.entry.Entry


        this.transactional = endpoint.isTransactional();
        this.transactionTimeout = endpoint.getTransactionTimeout();
    }

    public void process(Exchange exchange) throws Exception {
        Entry entry;
        Object body = exchange.getIn().getBody();

        if (!(body instanceof Entry)) {
            entry = new InEntry();
View Full Code Here


        this.javaSpace = javaSpace;
        this.transactionHelper = transactionHelper;
        this.transactionTimeout = transactionTimeout;
        this.verb = verb;
        if (templateId != null) {
            Entry tmpl = (Entry) this.endpoint.getCamelContext().getRegistry().lookup(templateId);
            template = javaSpace.snapshot(tmpl);
        } else {
            this.template = javaSpace.snapshot(new InEntry());
        }
    }
View Full Code Here

            DefaultExchange exchange = (DefaultExchange) endpoint.createExchange(ExchangePattern.InOut);
            Message message = exchange.getIn();
            if (transactionHelper != null) {
                tnx = transactionHelper.getJiniTransaction(transactionTimeout).transaction;
            }
            Entry entry = null;
            switch (verb) {
            case JavaSpaceConsumer.TAKE:
                entry = javaSpace.take(template, tnx, 100);
                break;
            case JavaSpaceConsumer.READ:
View Full Code Here

        this.transactional = endpoint.isTransactional();
        this.transactionTimeout = endpoint.getTransactionTimeout();
    }

    public void process(Exchange exchange) throws Exception {
        Entry entry;
        Object body = exchange.getIn().getBody();

        if (!(body instanceof Entry)) {
            entry = new InEntry();
View Full Code Here

        this.javaSpace = javaSpace;
        this.transactionHelper = transactionHelper;
        this.transactionTimeout = transactionTimeout;
        this.verb = verb;
        if (templateId != null) {
            Entry tmpl = (Entry) this.endpoint.getCamelContext().getRegistry().lookupByName(templateId);
            template = javaSpace.snapshot(tmpl);
        } else {
            this.template = javaSpace.snapshot(new InEntry());
        }
    }
View Full Code Here

            DefaultExchange exchange = (DefaultExchange) endpoint.createExchange(ExchangePattern.InOut);
            Message message = exchange.getIn();
            if (transactionHelper != null) {
                tnx = transactionHelper.getJiniTransaction(transactionTimeout).transaction;
            }
            Entry entry = null;
            switch (verb) {
            case JavaSpaceConsumer.TAKE:
                entry = javaSpace.take(template, tnx, 100);
                break;
            case JavaSpaceConsumer.READ:
View Full Code Here

              JOptionPane.QUESTION_MESSAGE);

      if(result == null){
      } else {
  // Save current value as template
  Entry template = cloneEntry((Entry) node.getEntryTop());
  Object oldVal = null;

  if(result.length() == 0){
    oldVal = node.setValue(null);
  } else {
    oldVal = node.setValue(result);
  }
  // modifyAttribute
  try {
    node.setObjectRecursive();
    Entry attr = (Entry) node.getEntryTop();
    //Entry template = (Entry) generateTemplate(attr);

    // cancel notify while adding an attribute
    cancelNotify();
View Full Code Here

              JOptionPane.WARNING_MESSAGE);
 
  return;
      }

      Entry target = (Entry) node.getObject();
      int result = JOptionPane.showConfirmDialog(AttributeTreePanel.this,
             new String[] {"Remove attribute:",
                 target.toString() },
             "Query",
             JOptionPane.YES_NO_OPTION);
 
      if(result == JOptionPane.YES_OPTION){
  // Remote Attribute
View Full Code Here

    }

    private Entry cloneEntry(Entry attr) {
      try {
  Class realClass = attr.getClass();
  Entry template = (Entry) realClass.newInstance();

  Field[] f = realClass.getFields();
  for(int i = 0; i < f.length; i++) {
    if(! usableField(f[i]))
      continue;
View Full Code Here

    }

    private Entry generateTemplate(Entry attr) {
      try {
  Class realClass = attr.getClass();
  Entry template = (Entry) realClass.newInstance();

  Field[] f = realClass.getFields();
  for(int i = 0; i < f.length; i++)
    f[i].set(template, null);
View Full Code Here

TOP

Related Classes of net.jini.core.entry.Entry

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.