|
2008-02-07 1.1.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 long |
readByteCount
Define the read byte count (long) field. |
protected static int |
WRITE_BYTES_RESOURCE
Define the write bytes resource (int) constant. |
protected long |
writeByteCount
Define the write byte count (long) field. |
| 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, INTEGER_TABLE_SIZE, 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, CONNECTION_TYPE, 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)
|
protected int |
getErrorSeverity(int errorNumber,
java.lang.Throwable error)
Return the error severity of the specified error number. |
java.lang.Object |
getLogDetails4()
Gets the log details4 (Object) value. |
java.lang.Object |
getLogDetails5()
Gets the log details5 (Object) value. |
long |
getReadByteCount()
Gets the read byte count (long) value. |
java.lang.String |
getResource(int resourceId)
Return the string resource. |
long |
getWriteByteCount()
Gets the write byte count (long) value. |
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)
|
void |
setReadByteCount(long readCount)
Sets the read byte count value. |
void |
setWriteByteCount(long writeCount)
Sets the write byte count value. |
void |
toStringInfo(java.lang.StringBuffer buffer)
To string info with the specified buffer parameter. |
void |
updateReadByteCount(long readCount)
Update read byte count with the specified read count parameter. |
void |
updateWriteByteCount(long writeCount)
Update write byte count with the specified write count parameter. |
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
protected long readByteCount
protected long writeByteCount
| Constructor Detail |
|---|
public Connection()
| Method Detail |
|---|
public static java.lang.String getDefaultResource(int resourceId)
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.
public void close()
throws java.io.IOException
close in interface ConnectionServicejava.io.IOException - IOException.ConnectionService.close()
public void exit()
throws java.io.IOException
exit in interface ConnectionServicejava.io.IOException - IOException.
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - Throwable.
public void flush()
throws java.io.IOException
flush in interface ConnectionServicejava.io.IOException - IOException.public 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.LogServicepublic java.lang.Object getLogDetails4()
getLogDetails4 in class EscObjectObject) value.public java.lang.Object getLogDetails5()
getLogDetails5 in class EscObjectObject) value.public long getReadByteCount()
long) value.setReadByteCount(long),
updateReadByteCount(long)public java.lang.String getResource(int resourceId)
EscObject
getResource in class EscObjectresourceId - The resource id (int) parameter.
String) value.getDefaultResource(int)public long getWriteByteCount()
long) value.setWriteByteCount(long),
updateWriteByteCount(long)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.IOException - IOException.ConnectionService.open()
public int read(byte[] bytes)
throws java.io.IOException
read in interface ConnectionServicebytes - The bytes (byte[]) parameter.
java.io.IOException - IOException.ConnectionService.read(byte[],int,int)public void setConfigurationService(ConfigurationService configurationService)
ConfigurationService)
parameter.
configurationService - The configuration service (ConfigurationService) parameter.getConfigurationService()public void setOpen(boolean open)
open - The open (boolean) parameter.isOpen()public void setReadByteCount(long readCount)
readCount - The read count (long) parameter.getReadByteCount(),
updateReadByteCount(long)public void setWriteByteCount(long writeCount)
writeCount - The write count (long) parameter.getWriteByteCount(),
updateWriteByteCount(long)public void toStringInfo(java.lang.StringBuffer buffer)
toStringInfo in class EscObjectbuffer - The buffer (StringBuffer) parameter.public void updateReadByteCount(long readCount)
readCount - The read count (long) parameter.getReadByteCount(),
setReadByteCount(long)public void updateWriteByteCount(long writeCount)
writeCount - The write count (long) parameter.getWriteByteCount(),
setWriteByteCount(long)
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.IOException - IOException.ConnectionService.write(byte[],int,int)
|
2008-02-07 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||