|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.validation.javapp.server.AbstractSingletonServer
public abstract class AbstractSingletonServer
basic services for a singleton server in ACTF
Field Summary | |
---|---|
static Charset |
CHARSET
|
static CharsetDecoder |
CHARSET_DECODER
|
static CharsetEncoder |
CHARSET_ENCODER
|
static String |
REQUEST_CLOSE
|
static String |
RESOURCE_SERVER_HOST_DEFAULT
|
static String |
RESOURCE_SERVER_HOST_KEY
|
static String |
RESOURCE_SERVER_PORT_DEFAULT
|
static String |
RESOURCE_SERVER_PORT_KEY
|
static int |
transaction_id
|
Constructor Summary | |
---|---|
AbstractSingletonServer()
|
Method Summary | |
---|---|
String |
getHostName()
|
int |
getPort()
returns the port on which this server is accepting connection requests |
boolean |
isShutdown()
returns whether or not this server has been shutdown. |
boolean |
isSuspended()
|
protected String |
receiveMessage(SocketChannel client)
|
static byte[] |
requestAsBytes(SocketChannel client)
|
static void |
sendResource(SocketChannel client,
byte[] bytes,
int size)
|
void |
setHostName(String name)
set the host name for this server. |
void |
setPort(int port)
set the port for this server to receive conection requests |
void |
setSuspended(boolean suspended)
|
void |
shutdown()
shut down the server |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int transaction_id
public static final String RESOURCE_SERVER_HOST_KEY
public static final String RESOURCE_SERVER_PORT_KEY
public static final String RESOURCE_SERVER_HOST_DEFAULT
public static final String RESOURCE_SERVER_PORT_DEFAULT
public static final Charset CHARSET
public static final CharsetEncoder CHARSET_ENCODER
public static final CharsetDecoder CHARSET_DECODER
public static final String REQUEST_CLOSE
Constructor Detail |
---|
public AbstractSingletonServer()
Method Detail |
---|
public String getHostName()
public void setHostName(String name)
name
- -
the host namepublic int getPort()
public void setPort(int port)
port
- -
port numberpublic boolean isSuspended()
public void setSuspended(boolean suspended)
public void shutdown()
public boolean isShutdown()
true
as soon as shutdown()
is invoked.
true
if server has been shut downprotected String receiveMessage(SocketChannel client) throws IOException
IOException
public static void sendResource(SocketChannel client, byte[] bytes, int size) throws IOException
IOException
public static byte[] requestAsBytes(SocketChannel client) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |