Package jcifs

Examples of jcifs.UniAddress$QueryThread


    public boolean authenticate(String password) {

        System.setProperty("jcifs.smb.client.disablePlainTextPasswords",
                            "true" );
        try {
            UniAddress mydomaincontroller = UniAddress.getByName(
                                                getDomainController());
            NtlmPasswordAuthentication mycreds = new
                                NtlmPasswordAuthentication(
                                        getDomainName(),
                                        super.getId(),
View Full Code Here


            do {
                try {
                    if (log.level >= 2)
                        log.println("DFS redirect: " + dr);

                    UniAddress addr = UniAddress.getByName(dr.server);
                    SmbTransport trans = SmbTransport.getSmbTransport(addr, url.getPort());
                    /* This is a key point. This is where we set the "tree" of this file which
                     * is like changing the rug out from underneath our feet.
                     */
/* Technically we should also try to authenticate here but that means doing the session setup and tree connect separately. For now a simple connect will at least tell us if the host is alive. That should be sufficient for 99% of the cases. We can revisit this again for 2.0.
View Full Code Here

            }
            String address = queryLookup(query, "address");
            if (address != null && address.length() > 0) {
                byte[] ip = java.net.InetAddress.getByName(address).getAddress();
                addresses = new UniAddress[1];
                addresses[0] = new UniAddress(java.net.InetAddress.getByAddress(host, ip));
                return getNextAddress();
            }
        }

        if (host.length() == 0) {
View Full Code Here

        }

        return getNextAddress();
    }
    UniAddress getNextAddress() {
        UniAddress addr = null;
        if (addressIndex < addresses.length)
            addr = addresses[addressIndex++];
        return addr;
    }
View Full Code Here

            throw new SmbException( "Failed to connect to server", ioe );
        }
    }
    void doConnect() throws IOException {
        SmbTransport trans;
        UniAddress addr;

        addr = getAddress();
        if (tree != null) {
            trans = tree.session.transport;
        } else {
View Full Code Here

* <tt>URLConnection</tt> implementation of <tt>connect()</tt>.
*/
    public void connect() throws IOException {
        SmbTransport trans;
        SmbSession ssn;
        UniAddress addr;

        if( isConnected() ) {
            return;
        }

View Full Code Here

                    type = TYPE_SHARE;
                }
            } else if( url.getAuthority() == null || url.getAuthority().length() == 0 ) {
                type = TYPE_WORKGROUP;
            } else {
                UniAddress addr;
                try {
                    addr = getAddress();
                } catch( UnknownHostException uhe ) {
                    throw new SmbException( url.toString(), uhe );
                }
                if( addr.getAddress() instanceof NbtAddress ) {
                    int code = ((NbtAddress)addr.getAddress()).getNameType();
                    if( code == 0x1d || code == 0x1b ) {
                        type = TYPE_WORKGROUP;
                        return type;
                    }
                }
View Full Code Here

            type = TYPE_WORKGROUP;
            return true;
        } else {
            getUncPath0();
            if( share == null ) {
                UniAddress addr = getAddress();
                if( addr.getAddress() instanceof NbtAddress ) {
                    int code = ((NbtAddress)addr.getAddress()).getNameType();
                    if( code == 0x1d || code == 0x1b ) {
                        type = TYPE_WORKGROUP;
                        return true;
                    }
                }
View Full Code Here

                                UnknownHostException,
                                MalformedURLException {
        String p = url.getPath();
        IOException last = null;
        FileEntry[] entries;
        UniAddress addr;
        FileEntry e;
        HashMap map;

        if (p.lastIndexOf('/') != (p.length() - 1))
            throw new SmbException(url.toString() + " directory must end with '/'");
View Full Code Here

            _domains = null;
        }
        if (_domains != null)
            return _domains.map;
        try {
            UniAddress addr = UniAddress.getByName(auth.domain, true);
            SmbTransport trans = SmbTransport.getSmbTransport(addr, 0);
            CacheEntry entry = new CacheEntry(Dfs.TTL * 10L);

            DfsReferral dr = trans.getDfsReferrals(auth, "", 0);
            if (dr != null) {
View Full Code Here

TOP

Related Classes of jcifs.UniAddress$QueryThread

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.