Examples of bind()


Examples of org.apache.mina.transport.socket.nio.NioDatagramAcceptor.bind()

        // The logger, if needed. Commented atm
        //DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();
        //chain.addLast("logger", new LoggingFilter());

        acceptor.bind(new InetSocketAddress(PORT));

        System.out.println("Server started...");
    }

    /**
 
View Full Code Here

Examples of org.apache.mina.transport.socket.nio.NioSocketAcceptor.bind()

    acceptor.setHandlernew ServerHandler() );

    acceptor.getSessionConfig().setReadBufferSize( 2048 );
    acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 10 );
    acceptor.bind( new InetSocketAddress(PORT) );
    System.out.println("Server running ...");

    final NioSocketConnector connector = new NioSocketConnector();

    // Set connect timeout.
View Full Code Here

Examples of org.apache.mina.transport.socket.nio.SocketAcceptor.bind()

        FixedRandomInputStream stream = new FixedRandomInputStream( 4 * 1024 * 1024 );
       
        SenderHandler sender = new SenderHandler( stream );
        ReceiverHandler receiver = new ReceiverHandler( stream.size );
       
        acceptor.bind( address, sender );
       
        synchronized( sender.lock )
        {
            synchronized( receiver.lock )
            {
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.VmPipeAcceptor.bind()

    public static void main(String[] args) throws Exception {
        IoAcceptor acceptor = new VmPipeAcceptor();
        VmPipeAddress address = new VmPipeAddress(8080);

        // Set up server
        acceptor.bind(address, new TennisPlayer());

        // Connect to the server.
        VmPipeConnector connector = new VmPipeConnector();
        ConnectFuture future = connector.connect(address, new TennisPlayer());
        future.join();
View Full Code Here

Examples of org.apache.naming.NamingContext.bind()

        server.addService( catalina );

        try {
            final NamingContext globalNamingContext = new NamingContext( new Hashtable<String, Object>(), "ctxt" );
            server.setGlobalNamingContext( globalNamingContext );
            globalNamingContext.bind( USER_DATABASE, createUserDatabase() );
        } catch ( final NamingException e ) {
            throw new RuntimeException( e );
        }

View Full Code Here

Examples of org.apache.ojb.broker.query.SelectionCriteria.bind()

            throws org.odmg.QueryParameterCountInvalidException, org.odmg.QueryParameterTypeInvalidException
    {
        try
        {
            SelectionCriteria crit = (SelectionCriteria) getBindIterator().next();
            crit.bind(parameter);

            // BRJ: bind is called twice for between
            if (crit instanceof BetweenCriteria && !crit.isBound())
            {
                getBindIterator().previous();
View Full Code Here

Examples of org.apache.ojb.odmg.oql.EnhancedOQLQuery.bind()

            _conn.invalidate(oid);
            tx.begin();
            oql = _conn.newOQLQuery();
            oql.create("select a from " + Article.class.getName()
                + " where articleId=$1 and articleName=$2");
            oql.bind(new Integer(77777));
            oql.bind("335");
            it = _conn.getIteratorByOQLQuery(oql);
            if (it.hasNext())
            {
                InterfaceArticle article = (InterfaceArticle) it.next();
View Full Code Here

Examples of org.apache.openejb.core.ivm.naming.IvmContext.bind()

    private IvmContext createIvmContext() {
        IvmContext context = new IvmContext(new NameNode(null, new ParsedName("comp"), null, null));
        try {
            context.createSubcontext("comp").createSubcontext("env");
            // todo remove this... IvmContext seems to drop empty nodes
            context.bind("java:comp/env/dummy", "dummy");
        } catch (NamingException e) {
            throw new IllegalStateException("Unable to create subcontext 'java:comp/env'.  Exception:"+e.getMessage(),e);
        }
        return context;
    }
View Full Code Here

Examples of org.apache.pivot.beans.BXMLSerializer.bind()

            throw new RuntimeException(exception);
        }

        fileBrowser.add(content);

        bxmlSerializer.bind(this, TerraFileBrowserSkin.class);

        driveListButton.getListButtonSelectionListeners().add(new ListButtonSelectionListener.Adapter() {
            @Override
            public void selectedItemChanged(ListButton listButton, Object previousSelectedItem) {
                if (previousSelectedItem != null) {
View Full Code Here

Examples of org.apache.pivot.beans.NamespaceBinding.bind()

    public void initialize(Map<String, Object> namespace, URL location, Resources resources) {
        // Bind list button selection to label text
        NamespaceBinding namespaceBinding1 = new NamespaceBinding(namespace,
            "listButton.selectedItem", "listButtonLabel1.text");

        namespaceBinding1.bind();

        // Bind list button selection to label text with bind mapping
        NamespaceBinding namespaceBinding2 = new NamespaceBinding(namespace,
            "listButton.selectedItem", "listButtonLabel2.text", new NamespaceBinding.BindMapping() {
            @Override
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.