Package org.apache.mina.registry

Examples of org.apache.mina.registry.Service


    {
        ServiceRegistry registry = new SimpleServiceRegistry();

        addLogger( registry );
        // Bind
        Service service = new Service( "reverse", TransportType.SOCKET, PORT );
        registry.bind( service, new ReverseProtocolProvider() );

        System.out.println( "Listening on port " + PORT );
    }
View Full Code Here


        }

        // construct the configuration, get the port, create the service, and prepare kdc objects
        KdcConfiguration config = new KdcConfiguration(props);
        int port = PropertiesUtils.get(env, KdcConfiguration.KERBEROS_PORT_KEY, KdcConfiguration.DEFAULT_KERBEROS_PORT);
        Service service = new Service("kerberos", TransportType.DATAGRAM, new InetSocketAddress(port));
        LdapContext ctx = getBaseRealmContext(config, env);
        PrincipalStore store = new JndiPrincipalStoreImpl(ctx, new LdapName("ou=Users"));
        SamSubsystem.getInstance().setUserContext((DirContext) ctx, "ou=Users");

        try {
View Full Code Here

     * @throws NamingException if there are problems starting the LDAP provider
     */
    private void startLdapProtocol(ServerStartupConfiguration cfg, Hashtable env) throws NamingException {
        int port = cfg.getLdapPort();
        InetAddress host = cfg.getHost();
        Service service = new Service("ldap", TransportType.SOCKET, new InetSocketAddress(host, port));
//        Service service = new Service( "ldap", TransportType.SOCKET, new InetSocketAddress( port ) );

        try {
            minaRegistry.bind(service, new LdapProtocolProvider((Hashtable) env.clone()));
            ldapService = service;
View Full Code Here

        }

        // construct the configuration, get the port, create the service, and prepare kdc objects
        KdcConfiguration config = new KdcConfiguration(props);
        int port = PropertiesUtils.get(env, KdcConfiguration.KERBEROS_PORT_KEY, KdcConfiguration.DEFAULT_KERBEROS_PORT);
        Service service = new Service("kerberos", TransportType.DATAGRAM, new InetSocketAddress(port));
        LdapContext ctx = getBaseRealmContext(config, env);
        PrincipalStore store = new JndiPrincipalStoreImpl(ctx, new LdapName("ou=Users"));
        SamSubsystem.getInstance().setUserContext((DirContext) ctx, "ou=Users");

        try {
View Full Code Here

     * @throws NamingException if there are problems starting the LDAP provider
     */
    private void startLdapProtocol(ServerStartupConfiguration cfg, Hashtable env) throws NamingException {
        int port = cfg.getLdapPort();
        InetAddress host = cfg.getHost();
        Service service = new Service("ldap", TransportType.SOCKET, new InetSocketAddress(host, port));

        try {
            minaRegistry.bind(service, new LdapProtocolProvider((Hashtable) env.clone()));
            ldapService = service;
            if (log.isInfoEnabled()) {
View Full Code Here

    {
        ServiceRegistry registry = new SimpleServiceRegistry();

        addLogger( registry );
        // Bind
        Service service = new Service( "reverse", TransportType.SOCKET, PORT );
        registry.bind( service, new ReverseProtocolProvider() );

        System.out.println( "Listening on port " + PORT );
    }
View Full Code Here

        ServiceRegistry registry = new SimpleServiceRegistry();

        VmPipeAddress address = new VmPipeAddress( 8080 );

        // Set up server
        Service service = new Service( "tennis", TransportType.VM_PIPE, address );
        registry.bind( service, new TennisPlayer() );

        // Connect to the server.
        VmPipeConnector connector = new VmPipeConnector();
        ProtocolSession session = connector.connect( address,
View Full Code Here

        }
       
        addLogger( registry );
       
        // Bind
        Service service = new Service( "echo", TransportType.SOCKET, PORT );
        registry.bind( service, new EchoProtocolHandler() );

        System.out.println( "Listening on port " + PORT );
    }
View Full Code Here

        }

        // construct the configuration, get the port, create the service, and prepare kdc objects
        KdcConfiguration config = new KdcConfiguration(props);
        int port = PropertiesUtils.get(env, KdcConfiguration.KERBEROS_PORT_KEY, KdcConfiguration.DEFAULT_KERBEROS_PORT);
        Service service = new Service("kerberos", TransportType.DATAGRAM, new InetSocketAddress(port));
        LdapContext ctx = getBaseRealmContext(config, env);
        PrincipalStore store = new JndiPrincipalStoreImpl(ctx, new LdapName("ou=Users"));
        SamSubsystem.getInstance().setUserContext((DirContext) ctx, "ou=Users");

        try {
View Full Code Here

     * @throws NamingException if there are problems starting the LDAP provider
     */
    private void startLdapProtocol(ServerStartupConfiguration cfg, Hashtable env) throws NamingException {
        int port = cfg.getLdapPort();
        InetAddress host = cfg.getHost();
        Service service = new Service("ldap", TransportType.SOCKET, new InetSocketAddress(host, port));
//        Service service = new Service( "ldap", TransportType.SOCKET, new InetSocketAddress( port ) );

        try {
            minaRegistry.bind(service, new LdapProtocolProvider((Hashtable) env.clone()));
            ldapService = service;
View Full Code Here

TOP

Related Classes of org.apache.mina.registry.Service

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.