Package games.livestreams.errors

Examples of games.livestreams.errors.ProviderError


        if (!streams.isEmpty()) {
            String[] streamsArray = new String[]{};

            return streams.toArray(streamsArray);
        } else {
            throw new ProviderError(String.format("No streams found on \"%s\" service with tag \"%s\"",
                    this.getProviderName(), tag));
        }
    }
View Full Code Here


                    try {
                        Provider provider = (Provider) providerClass.newInstance();

                        this.providers.add(provider);
                    } catch (Exception e) {
                        throw new ProviderError(String.format("Can't create an instance of \"%s\" provider", providerName));
                    }
                } catch (ClassNotFoundException e) {
                    throw new ProviderError(String.format("No such provider \"%s\"", providerName));
                }
            }
        }
    }
View Full Code Here

    public String[] getStreams(String providerName, String streamTag) {
        ArrayList<String> streams = new ArrayList<String>();
        String[] streamsArray = new String[]{};

        if (!this.isProviderExists(providerName)) {
            throw new ProviderError(String.format("No such provider \"%s\"", providerName));
        }

        for (Provider provider : this.providers) {
            if (provider.getProviderName().equalsIgnoreCase(providerName)) {
                try {
View Full Code Here

TOP

Related Classes of games.livestreams.errors.ProviderError

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.