org.encog.cloud
Class EncogCloud

java.lang.Object
  extended by org.encog.cloud.EncogCloud

public class EncogCloud
extends Object

Holds a connection to an Encog cloud.


Field Summary
static String DEFAULT_SERVER
          The default cloud server.
 
Constructor Summary
EncogCloud()
          Construct an Encog cloud connection to the default server at: http://cloud.encog.com/ url.
EncogCloud(String server)
          Construct an Encog cloud connection.
 
Method Summary
 CloudTask beginTask(String name)
          Begin a task with the specified name.
 void connect(String uid, String pwd)
          Connect to the Encog cloud.
 String constructService(String service)
          Construct a string that connects to the specified service.
 String getSession()
           
 boolean isConnected()
           
 void logout()
          Logout of the specified session.
 void validateSession(boolean failOnError)
          Validate the session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SERVER

public static final String DEFAULT_SERVER
The default cloud server.

See Also:
Constant Field Values
Constructor Detail

EncogCloud

public EncogCloud()
Construct an Encog cloud connection to the default server at: http://cloud.encog.com/ url.


EncogCloud

public EncogCloud(String server)
Construct an Encog cloud connection. The connection will not be established until the connect method is called.

Parameters:
server - The server to connect to.
Method Detail

beginTask

public CloudTask beginTask(String name)
Begin a task with the specified name.

Parameters:
name - The name of the task to begin.
Returns:
The new task.

connect

public void connect(String uid,
                    String pwd)
Connect to the Encog cloud.

Parameters:
uid - The user id.
pwd - The password.

constructService

public String constructService(String service)
Construct a string that connects to the specified service.

Parameters:
service - The service to connect to.
Returns:
The complete URL.

getSession

public String getSession()
Returns:
The session we are connected to.

isConnected

public boolean isConnected()
Returns:
True if we are connected.

logout

public void logout()
Logout of the specified session.


validateSession

public void validateSession(boolean failOnError)
Validate the session.

Parameters:
failOnError - True if an exception should be thrown on error.


Copyright © 2011. All Rights Reserved.