|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.soda.dk.core.EscObject
org.eclipse.soda.dk.connection.Connection
public abstract class Connection
The Connection class implements the ConnectionService interface.
ConnectionService| Field Summary | |
|---|---|
protected static int |
CLIENT_WAIT_RESOURCE
Define the client wait resource (int) constant. |
protected static int |
CLOSE_RESOURCE
Define the close resource (int) constant. |
protected static int |
CLOSED_RESOURCE
Define the closed resource (int) constant. |
protected ConfigurationService |
configurationService
Define the port configuration (SerialPortConfiguration) field. |
protected static int |
OPEN_RESOURCE
Define the open resource (int) constant. |
protected static int |
OPENFAILED_RESOURCE
Define the openfailed resource (int) constant. |
protected static int |
READ_BYTES_RESOURCE
Define the read bytes resource (int) constant. |
protected static int |
WRITE_BYTES_RESOURCE
Define the write bytes resource (int) constant. |
| Fields inherited from class org.eclipse.soda.dk.core.EscObject |
|---|
CLONE_EXCEPTION_RESOURCE, EMPTY_BYTES, EMPTY_STRING, ERROR_OCCURRED_EXCEPTION_RESOURCE, ID_FILTER_KEY, ID_KEY, ID_KEY_ANY, INTEGER_TABLE, KEY_KEY, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_TRACE, LOG_WARNING, PREFIX_KEY, RESOURCE_BUNDLE, SLEEP_EXCEPTION_RESOURCE, SYSTEM_INFO_RESOURCE, TO_STRING_CONFIGURATION_KEYS, TRACE_LEVEL_HIGH, TRACE_LEVEL_LOW, TRACE_LEVEL_MAX, TRACE_LEVEL_MIN, TRACE_LEVEL_NONE, TRACE_LEVEL_NORMAL, TRACELEVEL_KEY, UNKNOWN_ERROR_RESOURCE |
| Fields inherited from interface org.eclipse.soda.dk.connection.service.ConnectionService |
|---|
CONNECTION_KEY, DEFAULT_CONNECTION, SERVICE_NAME |
| Constructor Summary | |
|---|---|
Connection()
|
|
| Method Summary | |
|---|---|
protected boolean |
attemptRecoveryFromError(int errorNumber,
java.lang.Throwable error)
Returns true if attempt recovery from error. |
void |
close()
Perform the close action method. |
void |
exit()
Exit. |
protected void |
finalize()
Perform the finalize action method. |
void |
flush()
Flush any data to be written. |
ConfigurationService |
getConfigurationService()
Gets the configuration service value. |
static java.lang.String |
getDefaultResource(int resourceId)
Get default resource with the specified resource id parameter and return the String result. |
protected int |
getErrorSeverity(int errorNumber,
java.lang.Throwable error)
Return the error severity of the specified error number. |
java.lang.String |
getResource(int resourceId)
Gets the string resource using the supplied resourceId. |
boolean |
isOpen()
Gets the boolean open property value. |
void |
open()
Perform the open action method. |
int |
read(byte[] bytes)
Read bytes. |
void |
setConfigurationService(ConfigurationService configurationService)
Sets the configuration service value. |
void |
setOpen(boolean open)
Sets the open value. |
void |
write(byte[] bytes)
Writes count bytes from the byte array
buffer starting at offset. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.soda.dk.connection.service.ConnectionService |
|---|
read, write |
| Field Detail |
|---|
protected static final int OPEN_RESOURCE
protected static final int CLOSE_RESOURCE
protected static final int CLOSED_RESOURCE
protected static final int OPENFAILED_RESOURCE
protected static final int READ_BYTES_RESOURCE
protected static final int WRITE_BYTES_RESOURCE
protected static final int CLIENT_WAIT_RESOURCE
protected ConfigurationService configurationService
| Constructor Detail |
|---|
public Connection()
| Method Detail |
|---|
public static java.lang.String getDefaultResource(int resourceId)
int) parameter.
resourceId - The resource id (int) parameter.
String)
value.
protected boolean attemptRecoveryFromError(int errorNumber,
java.lang.Throwable error)
EscObject
attemptRecoveryFromError in class EscObjecterrorNumber - The error number (int) parameter.error - The error (Throwable) parameter.
boolean)
value.The error number (int) parameter.
The error (Throwable) parameter.
public void close()
throws java.io.IOException
close in interface ConnectionServicejava.io.IOExceptionConnectionService.close()
public void exit()
throws java.io.IOException
exit in interface ConnectionServiceIOException.
java.io.IOException
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
public void flush()
throws java.io.IOException
flush in interface ConnectionServicejava.io.IOExceptionpublic ConfigurationService getConfigurationService()
getConfigurationService in class EscObjectConfigurationService)
value.setConfigurationService(ConfigurationService)
protected int getErrorSeverity(int errorNumber,
java.lang.Throwable error)
EscObject
getErrorSeverity in class EscObjecterrorNumber - The error number (int) parameter.error - The error (Throwable) parameter.
int) value.The error number (int) parameter.
The error (Throwable) parameter.public java.lang.String getResource(int resourceId)
int) parameter.
getResource in class EscObjectresourceId - The resource id (int) parameter.
String) value.getDefaultResource(int)public boolean isOpen()
boolean open property value.
isOpen in interface ConnectionServiceboolean) value.ConnectionService.isOpen(),
setOpen(boolean)
public void open()
throws java.io.IOException
open in interface ConnectionServicejava.io.IOExceptionConnectionService.open()
public int read(byte[] bytes)
throws java.io.IOException
read in interface ConnectionServicebytes - The bytes (byte[]) parameter.
java.io.IOExceptionConnectionService.read(byte[],int,int)public void setConfigurationService(ConfigurationService configurationService)
ConfigurationService)
parameter.
configurationService - The configuration service (ConfigurationService) parameter.getConfigurationService()public void setOpen(boolean open)
boolean) parameter.
open - The open (boolean) parameter.isOpen()
public void write(byte[] bytes)
throws java.io.IOException
count bytes from the byte array
buffer starting at offset.
the buffer to be written
an error occurs attempting to write to this OutputStream.
If offset or count are outside of bounds.
write in interface ConnectionServicebytes - The bytes (byte[]) parameter.
java.io.IOExceptionConnectionService.write(byte[],int,int)
|
1.0.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||