Examples of Bind


Examples of ie.omk.smpp.message.Bind

            int numberPlan,
            String addrRange)
    throws java.io.IOException, InvalidParameterValueException,
    IllegalArgumentException, AlreadyBoundException, VersionException,
    SMPPProtocolException {
        Bind bindReq = null;

        try {
            switch (type) {
            case TRANSMITTER:
                bindReq = (Bind) newInstance(SMPPPacket.BIND_TRANSMITTER);
                break;
            case RECEIVER:
                bindReq = (Bind) newInstance(SMPPPacket.BIND_RECEIVER);
                break;
            case TRANSCEIVER:
                if (this.interfaceVersion.isOlder(SMPPVersion.V34)) {
                    throw new VersionException(
                            "Cannot bind as transceiver in "
                            + interfaceVersion.toString());
                }
                bindReq = (Bind) newInstance(SMPPPacket.BIND_TRANSCEIVER);
                break;
            default:
                throw new IllegalArgumentException("No such connection type.");
            }
        } catch (BadCommandIDException x) {
            LOGGER.error("Internal error in the smppapi. Please inform the maintainer.", x);
        }

        connectionType = type;
        LOGGER.info("Binding to the SMSC as type " + type);

        bindReq.setVersion(interfaceVersion);
        bindReq.setSystemId(systemID);
        bindReq.setPassword(password);
        bindReq.setSystemType(systemType);
        bindReq.setAddressTon(typeOfNum);
        bindReq.setAddressNpi(numberPlan);
        bindReq.setAddressRange(addrRange);
        return (BindResp) sendRequestInternal(bindReq);
    }
View Full Code Here

Examples of lupos.engine.operators.singleinput.Bind

      }
      // TODO consider graphConstraint!
      this.indexScanCreator.createEmptyIndexScanSubmittingQueryResultWithOneEmptyBindingsAndConnectWithRoot(new OperatorIDTuple(projection,0), graphConstraint);
      return projection;
    } else if (!getItem(subjectNode).isVariable()){
      final Bind firstBind = new Bind(object);
      firstBind.addProjectionElement(object, subjectNode);
      // TODO consider graphConstraint!
      this.indexScanCreator.createEmptyIndexScanSubmittingQueryResultWithOneEmptyBindingsAndConnectWithRoot(new OperatorIDTuple(firstBind,0), graphConstraint);
      return firstBind;
    } else if(!getItem(objectNode).isVariable()){
      final LinkedList<TriplePattern> temp = new LinkedList<TriplePattern>();
      final Item[] items = {subject, getItem(node.jjtGetChild(0)), object};
      temp.add(new TriplePattern(items));
      final Bind firstBind = new Bind(subject);
      firstBind.addProjectionElement(subject, objectNode);
      // TODO consider graphConstraint!
      this.indexScanCreator.createEmptyIndexScanSubmittingQueryResultWithOneEmptyBindingsAndConnectWithRoot(new OperatorIDTuple(firstBind,0), graphConstraint);
      return firstBind;
    } else {
      final Union union = new Union();
      final Variable intermediatePredicate = this.getVariable(subject.toString(),object.toString(),"intermediatePredicate");
      final Variable intermediateObject = this.getVariable(subject.toString(),object.toString(),"intermediateObject");
      final Item[] items = {subject, intermediatePredicate, intermediateObject};
      LinkedList<TriplePattern> temp = new LinkedList<TriplePattern>();
      TriplePattern tp = new TriplePattern(items);
      temp.add(tp);
      this.indexScanCreator.createIndexScanAndConnectWithRoot(new OperatorIDTuple(union,0), temp, graphConstraint);

      items[0] = intermediateObject;
      items[1] = intermediatePredicate;
      items[2] = subject;
      temp = new LinkedList<TriplePattern>();
      tp = new TriplePattern(items.clone());
      temp.add(tp);
      this.indexScanCreator.createIndexScanAndConnectWithRoot(new OperatorIDTuple(union,1), temp, graphConstraint);

      final Projection projection = new Projection();
      projection.addProjectionElement(subject);
      projection.addProjectionElement(object);
      if(graphConstraint!=null && graphConstraint.isVariable() && !graphConstraint.equals(getItem(subjectNode)) && !graphConstraint.equals(getItem(objectNode))) {
        projection.addProjectionElement((Variable)graphConstraint);
      }
      final ASTVar n = new ASTVar(100);
      n.setName(subject.toString().substring(1));
      final Bind bind = new Bind(subject);
      bind.addProjectionElement(object,n);
      union.addSucceedingOperator(new OperatorIDTuple(bind,0));
      bind.addSucceedingOperator(new OperatorIDTuple(projection,0));
      final InMemoryDistinct memoryDistinct = new InMemoryDistinct();
      projection.addSucceedingOperator(new OperatorIDTuple(memoryDistinct,0));
      return memoryDistinct;
    }
  }
View Full Code Here

Examples of lupos.engine.operators.singleinput.Bind

      for (int i = 0; i < node.jjtGetNumChildren(); i++) {
        final Node n = node.jjtGetChild(i);
        if (n instanceof ASTBind) {
          final ASTVar variable = (ASTVar) n.jjtGetChild(1);
          final Variable variable2 = new Variable(variable.getName());
          final Bind b = new Bind(variable2);
          b.addProjectionElement(variable2, n.jjtGetChild(0));
          connection.connectAndSetAsNewOperatorConnection(b, 0);
        }
      }
      for (int i = 0; i < node.jjtGetNumChildren(); i++) {
        final Node n = node.jjtGetChild(i);
View Full Code Here

Examples of net.gescobar.smppserver.packet.Bind

    waitUntilStatus(connector, DEFAULT_TIMEOUT, Status.OK);

    connector.doStop();

    // validate the bind packet
    Bind bind = pp.getBindPacket(DEFAULT_TIMEOUT);
    Assert.assertNotNull( bind );
    Assert.assertEquals( bind.getCommandId(), SmppPacket.BIND_TRANSCEIVER );
    Assert.assertEquals( bind.getSystemId(), "test" );
    Assert.assertEquals( bind.getPassword(), "test" );
    Assert.assertEquals( bind.getSystemType(), "test" );
    Assert.assertEquals( bind.getAddressRange().getNpi(), 1 );
    Assert.assertEquals( bind.getAddressRange().getTon(), 2 );
  }
View Full Code Here

Examples of net.gescobar.smppserver.packet.Bind

    @Override
    public void processPacket(SmppRequest packet, ResponseSender responseSender) {
      if (packet.isBind()) {

        Bind bind = (Bind) packet;
        String systemId = bind.getSystemId();
        String password = bind.getPassword();

        if (systemId == null || "".equals(systemId)) {
          responseSender.send( Response.INVALID_PARAMETER_VALUE );
          return;
        }
View Full Code Here

Examples of net.sourceforge.segment.util.Bind

      Thread.currentThread().setContextClassLoader(Srx2Parser.class.getClassLoader());
    }
   
    // Must pass the ClassLoader directly due to Java 1.5 bugs when using
    // custom ClassLoader.
    Bind bind = new Bind(
        getContext(CONTEXT, Srx2Parser.class.getClassLoader()),
        getSchema(getReader(getResourceStream(SCHEMA))));
    return bind;
  }
View Full Code Here

Examples of nexj.core.persistence.sql.SQLAdapter.Bind

               setInstanceValue(column, value);
            }

            value = m_adapter.toBind(column, value);

            Bind bind = m_adapter.getBind(column);

            if (m_adapter.isDebug())
            {
               m_adapter.logBindValue(nValCount, value);
            }

            bind.setValue(stmt, nValCount++, value, m_adapter);

            if (m_adapter.isCaseConverted(column))
            {
               if (m_adapter.isDebug())
               {
                  m_adapter.logBindValue(nValCount, value);
               }

               bind.setValue(stmt, nValCount++, value, m_adapter);
            }
         }
      }

      Index pk = m_table.getPrimaryKey();
View Full Code Here

Examples of nexj.core.persistence.sql.SQLAdapter.Bind

         {
            Column column = m_table.getColumn(i);

            value = m_adapter.toBind(column, value);

            Bind bind = m_adapter.getBind(column);

            if (m_adapter.isDebug())
            {
               m_adapter.logBindValue(nValCount, value);
            }

            bind.setValue(stmt, nValCount++, value, m_adapter);

            if (m_adapter.isCaseConverted(column))
            {
               if (m_adapter.isDebug())
               {
                  m_adapter.logBindValue(nValCount, value);
               }

               bind.setValue(stmt, nValCount++, value, m_adapter);
            }
         }
      }

      if (m_bDenorm)
View Full Code Here

Examples of nexj.core.persistence.sql.SQLAdapter.Bind

         {
            Column column = m_table.getColumn(i);

            value = m_adapter.toBind(column, value);

            Bind bind = m_adapter.getBind(column);

            if (m_adapter.isDebug())
            {
               m_adapter.logBindValue(nValCount, value);
            }

            bind.setValue(stmt, nValCount++, value, m_adapter);

            if (m_adapter.isCaseConverted(column))
            {
               if (m_adapter.isDebug())
               {
                  m_adapter.logBindValue(nValCount, value);
               }

               bind.setValue(stmt, nValCount++, value, m_adapter);
            }
         }
      }

      if (m_bIdentity)
View Full Code Here

Examples of org.apache.struts2.dojo.components.Bind

    public BindModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
        super(stack, req, res);
    }

    protected Component getBean() {
        return new Bind(stack, req, res);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.