Android Open Source - Gents Server Ghost






From Project

Back to project page Gents.

License

The source code is released under:

MIT License

If you think the Android project Gents listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.gsfraley.gents.service;
/*  w w w  .j a  v  a 2 s . c  o m*/
import android.content.Context;
import android.content.Intent;

public abstract class ServerGhost {
  public final static String NAME = "ServerGhost";
  public final static String DESCRIPTION = "A server.";
  
  public final static int
    // Main status types
    STOPPED = 0,
    RUNNING = 1;
  
  public abstract void start();
  public abstract void stop();
  public abstract boolean isConfigurable();
  public abstract Intent configIntent();
  
  protected int status;
  protected final int serverId;
  
  private Context mContext;
  
  protected Context getContext() {
    return mContext;
  }
  
  public int getStatus() {
    return status;
  }
  
  public int getServerId() {
    return serverId;
  }
  
  public void restart() {
    stop();
    start();
  }
  
  public ServerGhost(Context context, int sid) {
    serverId = sid;
    mContext = context;
  }
}




Java Source Code List

fi.iki.elonen.NanoHTTPD.java
org.gsfraley.gents.app.adapters.RunningServerAdapter.java
org.gsfraley.gents.app.adapters.ServerTypeAdapter.java
org.gsfraley.gents.app.fragments.RunningServerFragment.java
org.gsfraley.gents.app.fragments.ServerTypeFragment.java
org.gsfraley.gents.app.main.MainActivityListener.java
org.gsfraley.gents.app.main.MainActivity.java
org.gsfraley.gents.service.ManagerListener.java
org.gsfraley.gents.service.ServerBoss.java
org.gsfraley.gents.service.ServerGhost.java
org.gsfraley.gents.service.ServerManager.java
org.gsfraley.gents.service.servers.echoserver.EchoServerPreferenceActivity.java
org.gsfraley.gents.service.servers.echoserver.EchoServer.java
org.gsfraley.gents.service.servers.helloserver.HelloServerPreferenceActivity.java
org.gsfraley.gents.service.servers.helloserver.HelloServer.java
org.gsfraley.gents.service.servers.nullserver.NullServer.java
org.gsfraley.gents.service.servers.yesserver.YesServerPreferenceActivity.java
org.gsfraley.gents.service.servers.yesserver.YesServer.java