Package com.googlecode.gmail4j.http

Examples of com.googlecode.gmail4j.http.HttpGmailConnection


    @Test
    public void testGetUnreadMessages() {
        try {
            TestConfigurer conf = TestConfigurer.getInstance();           
            final RssGmailClient client = new RssGmailClient();
            final GmailConnection connection = new HttpGmailConnection();
            connection.setLoginCredentials(conf.getGmailCredentials());
            if (conf.useProxy()) {
                ((ProxyAware) connection).setProxy(conf.getProxyHost(),
                        conf.getProxyPort());
                ((ProxyAware) connection).setProxyCredentials(
                        conf.getProxyCredentials());
View Full Code Here


    }
   
    @Override
    public List<GmailMessage> getUnreadMessages() {
        final List<GmailMessage> messages = new ArrayList<GmailMessage>();
        HttpGmailConnection c = null;
        try {
            //for ROME properties loader
            Thread.currentThread().setContextClassLoader(getClass()
                    .getClassLoader());
            c = getGmailConnection();
            c.setUrl(gmailFeedUrl);
            final URLConnection con = c.openConnection();
            final SyndFeedInput feedInput = new SyndFeedInput();
            final SyndFeed gmail = feedInput.build(new XmlReader(con));
            for (final Object entry : gmail.getEntries()) {
                if (entry instanceof SyndEntry) {
                    messages.add(new RssGmailMessage((SyndEntry) entry));
View Full Code Here

    }
   
    @Override
    public List<GmailMessage> getUnreadMessages() {
        final List<GmailMessage> messages = new ArrayList<GmailMessage>();
        HttpGmailConnection c = null;
        try {
            //for ROME properties loader
            Thread.currentThread().setContextClassLoader(getClass()
                    .getClassLoader());
            c = getGmailConnection();
            c.setUrl(gmailFeedUrl);
            final URLConnection con = c.openConnection();
            final SyndFeedInput feedInput = new SyndFeedInput();
            final SyndFeed gmail = feedInput.build(new XmlReader(con));
            for (final Object entry : gmail.getEntries()) {
                if (entry instanceof SyndEntry) {
                    messages.add(new RssGmailMessage((SyndEntry) entry));
View Full Code Here

    }
   
    @Override
    public List<GmailMessage> getUnreadMessages() {
        final List<GmailMessage> messages = new ArrayList<GmailMessage>();
        HttpGmailConnection c = null;
        try {
            //for ROME properties loader
            Thread.currentThread().setContextClassLoader(getClass()
                    .getClassLoader());
            c = getGmailConnection();
            c.setUrl(gmailFeedUrl);
            final URLConnection con = c.openConnection();
            final SyndFeedInput feedInput = new SyndFeedInput();
            final SyndFeed gmail = feedInput.build(new XmlReader(con));
            for (final Object entry : gmail.getEntries()) {
                if (entry instanceof SyndEntry) {
                    messages.add(new RssGmailMessage((SyndEntry) entry));
View Full Code Here

   
    @Before
    public void connect() {
        TestConfigurer conf = TestConfigurer.getInstance();           
        client = new RssGmailClient();
        final GmailConnection connection = new HttpGmailConnection();
        connection.setLoginCredentials(conf.getGmailCredentials());
        if (conf.useProxy()) {
            ((ProxyAware) connection).setProxy(conf.getProxyHost(),
                    conf.getProxyPort());
            ((ProxyAware) connection).setProxyCredentials(
                    conf.getProxyCredentials());
View Full Code Here

TOP

Related Classes of com.googlecode.gmail4j.http.HttpGmailConnection

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.