Examples of Bind


Examples of akka.zeromq.Bind

  public void demonstrateCreateSocket() {
    Assume.assumeTrue(checkZeroMQInstallation());

    //#pub-socket
    ActorRef pubSocket = ZeroMQExtension.get(system).newPubSocket(
      new Bind("tcp://127.0.0.1:1233"));
    //#pub-socket

    //#sub-socket
    ActorRef listener = system.actorOf(Props.create(ListenerActor.class));
    ActorRef subSocket = ZeroMQExtension.get(system).newSubSocket(
      new Connect("tcp://127.0.0.1:1233"),
      new Listener(listener), Subscribe.all());
    //#sub-socket

    //#sub-topic-socket
    ActorRef subTopicSocket = ZeroMQExtension.get(system).newSubSocket(
      new Connect("tcp://127.0.0.1:1233"),
      new Listener(listener), new Subscribe("foo.bar"));
    //#sub-topic-socket

    //#unsub-topic-socket
    subTopicSocket.tell(new Unsubscribe("foo.bar"), ActorRef.noSender());
    //#unsub-topic-socket

    byte[] payload = new byte[0];
    //#pub-topic
    pubSocket.tell(ZMQMessage.withFrames(ByteString.fromString("foo.bar"),
      ByteString.fromArray(payload)), ActorRef.noSender());
    //#pub-topic

    system.stop(subSocket);
    system.stop(subTopicSocket);

    //#high-watermark
    ActorRef highWatermarkSocket = ZeroMQExtension.get(system).newRouterSocket(
        new SocketOption[] { new Listener(listener),
          new Bind("tcp://127.0.0.1:1233"), new HighWatermark(50000) });
    //#high-watermark
  }
View Full Code Here

Examples of ca.ucalgary.ispia.rebac.Bind

   

    else if (policy instanceof Bind){

      Bind temp = (Bind) policy;

      findFreeVars(temp.getPolicy(), free_vars);

      free_vars.remove(temp.getVariable());

    }

   

    else if (policy instanceof At){

      At temp = (At) policy;

      findFreeVars(temp.getPolicy(), free_vars);

      free_vars.add(temp.getVariable());

    }

    return free_vars;
View Full Code Here

Examples of cat.quickdb.date200912.model.Bind

                QuickDBTests.user, QuickDBTests.pass, QuickDBTests.scheme);
    }

    @Test
    public void testBinding(){
        Bind b = new Bind();
        Bind2 b2 = new Bind2();

        b.setDescription("description");
        b2.setName("name binding2");

        Assert.assertTrue(b.save());
        Assert.assertTrue(b2.save());

        Bind bind = new Bind();
        admin.obtain(bind, "description = 'description'");
        Assert.assertEquals("description", bind.getDescription());
        Bind2 bind2 = new Bind2();
        admin.obtain(bind2, "name = 'name binding2'");
        Assert.assertEquals("name binding2", bind2.getName());
    }
View Full Code Here

Examples of com.et.mvc.binding.Bind

                ctx.setParameterName(names[i]);
                ctx.setParameterType(types[i]);
                ctx.setRequest(getRequest());
                Annotation[] ann = annotations[i];
                if (ann.length > 0 && ann[0] instanceof Bind){
                    Bind bind = (Bind)ann[0];
                    ctx.setPrefix(bind.prefix());
                }
                else{
                    ctx.setPrefix("");
                }
                DataBinder binder = DataBinders.getDataBinder(types[i]);
View Full Code Here

Examples of com.github.sardine.model.Bind

      {
        p.getContent().add(new All());
      }
      else if ("bind".equals(right))
      {
        p.getContent().add(new Bind());
      }
      else if ("read".equals(right))
      {
        p.getContent().add(new Read());
      }
View Full Code Here

Examples of com.google.javascript.jscomp.CodingConvention.Bind

  private Node tryFoldImmediateCallToBoundFunction(Node n) {
    // Rewriting "(fn.bind(a,b))()" to "fn.call(a,b)" makes it inlinable
    Preconditions.checkState(n.isCall());
    Node callTarget = n.getFirstChild();
    Bind bind = getCodingConvention().describeFunctionBind(callTarget, false);
    if (bind != null) {
      // replace the call target
      bind.target.detachFromParent();
      n.replaceChild(callTarget, bind.target);
      callTarget = bind.target;
View Full Code Here

Examples of com.google.javascript.jscomp.CodingConvention.Bind

  private Node tryFoldImmediateCallToBoundFunction(Node n) {
    // Rewriting "(fn.bind(a,b))()" to "fn.call(a,b)" makes it inlinable
    Preconditions.checkState(n.getType() == Token.CALL);
    Node callTarget = n.getFirstChild();
    Bind bind = getCodingConvention().describeFunctionBind(callTarget);
    if (bind != null) {
      // replace the call target
      bind.target.detachFromParent();
      n.replaceChild(callTarget, bind.target);
      callTarget = bind.target;
View Full Code Here

Examples of com.hp.hpl.jena.graph.query.QueryNode.Bind

    public QueryNode createFixed( Node n )
        { return new Fixed( n ); }
   
    @Override
    public QueryNode createBind( Node node, int i )
        { return new Bind( node, i ); }
View Full Code Here

Examples of com.sissi.protocol.iq.bind.Bind

*/
public class BindResourceProcessor extends ProxyProcessor {

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Bind bind = protocol.cast(Bind.class);
    if (bind.hasResource()) {
      context.jid().resource(bind.getResource().getText());
    }
    return true;
  }
View Full Code Here

Examples of ie.omk.smpp.message.Bind

            int numberPlan,
            String addrRange)
    throws java.io.IOException, InvalidParameterValueException,
    IllegalArgumentException, AlreadyBoundException, VersionException,
    SMPPProtocolException {
        Bind bindReq = null;
        // Must be reset before newInstance is called.
        if (this.seqNumScheme != null) {
            this.seqNumScheme.reset();
        }
        if (!asyncComms) {
            // Ensure neither of the automatic reply settings are enabled.
            ackQryLinks = false;
            ackDeliverSm = false;
        }
        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
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.