Package jcifs

Examples of jcifs.UniAddress$QueryThread


    static NbtAddress[] dc_list = null;
    static long dc_list_expiration;
    static int dc_list_counter;

    private static NtlmChallenge interrogate( NbtAddress addr ) throws SmbException {
        UniAddress dc = new UniAddress( addr );
        SmbTransport trans = SmbTransport.getSmbTransport( dc, 0 );
        if (USERNAME == null) {
            trans.connect();
            if (SmbTransport.log.level >= 3)
                SmbTransport.log.println(
View Full Code Here


                    hostName,
                    tree.share,
                    unc,
                    auth);
        if (dr != null) {
            UniAddress addr;
            SmbTransport trans;

            try {
                addr = UniAddress.getByName( dr.server );
            } catch( UnknownHostException uhe ) {
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);
            DfsReferral[] dr = trans.getDfsReferrals(auth, "", 0);
            CacheEntry entry = new CacheEntry(Dfs.TTL * 10L);
            for (int di = 0; di < dr.length; di++) {
                String domain = dr[di].server;
View Full Code Here

                    NtlmPasswordAuthentication auth) throws SmbAuthException {
        if (DISABLED)
            return null;

        try {
            UniAddress addr = UniAddress.getByName(domain, true);
            SmbTransport trans = SmbTransport.getSmbTransport(addr, 0);
            DfsReferral[] dr = trans.getDfsReferrals(auth, "\\" + domain, 1);
            if (dr.length == 1) {
                addr = UniAddress.getByName(dr[0].server);
                return SmbTransport.getSmbTransport(addr, 0);
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.