|
2009-01-09 1.2.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 |
CHANNEL_ACTIVE_STATE_RESOURCE
Define the channel active state resource (int) constant. |
static int |
CHANNEL_ALIVE_STATE_RESOURCE
Define the channel alive resource (int) constant. |
static int |
CHANNEL_CLOSED_RESOURCE
Define the channel closed resource (int) constant. |
static int |
CHANNEL_CONNECTED_STATE_RESOURCE
Define the channel connected resource (int) constant. |
protected static int |
CHANNEL_CREATED_STATE_RESOURCE
Define the channel created state resource (int) constant. |
protected static int |
CHANNEL_DEAD_STATE_RESOURCE
Define the channel dead state resource (int) constant. |
protected static int |
CHANNEL_OPEN
Define the read bytes resource (int) constant. |
static int |
CHANNEL_OPENFAILED_RESOURCE
Define the channel open failed resource (int) constant. |
protected static int |
CHANNEL_READ_BYTES_RESOURCE
Define the read bytes resource (int) constant. |
protected static int |
CHANNEL_STARTED_STATE_RESOURCE
Define the channel started state resource (int) constant. |
protected static int |
CHANNEL_WRITE_BYTES_RESOURCE
Define the write bytes resource (int) constant. |
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 int |
logLevel
Define the log level (int) 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 interface org.eclipse.soda.dk.connection.service.ConnectionService |
|---|
CONNECTION_DEFAULT, CONNECTION_KEY, CONNECTION_TYPE, DEFAULT_CONNECTION, SERVICE_NAME |
| Constructor Summary | |
|---|---|
protected |
Connection()
Constructs an instance of this class. |
protected |
Connection(ConfigurationService configuration)
Constructs an instance of this class from the specified configuration parameter. |
protected |
Connection(java.util.Dictionary properties)
Constructs an instance of this class from the specified properties parameter. |
| Method Summary | |
|---|---|
protected boolean |
attemptRecoveryFromError(int errorNumber,
java.lang.Throwable error)
Attempt recovery from error with the specified error number and error parameters and return the boolean result. |
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)
Get error severity with the specified error number and error parameters and return the int result. |
java.lang.Object |
getLogDetails4()
Gets the log details4 (Object) value. |
java.lang.Object |
getLogDetails5()
Gets the log details5 (Object) value. |
int |
getLogLevel()
Gets the log level (int) value. |
long |
getReadByteCount()
Gets the read byte count (long) value. |
java.lang.String |
getResource(int resourceId)
Get resource with the specified resource ID parameter and return the String result. |
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 |
setConfigurationInformation(java.util.Dictionary configurationInformation)
Sets the configuration information value. |
void |
setConfigurationService(ConfigurationService configurationService)
Sets the configuration service value. |
void |
setLogLevel(int logLevel)
Sets the log level value. |
void |
setOpen(boolean open)
Sets the open value. |
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 static final int CHANNEL_DEAD_STATE_RESOURCE
protected static final int CHANNEL_CREATED_STATE_RESOURCE
public static final int CHANNEL_ALIVE_STATE_RESOURCE
public static final int CHANNEL_CONNECTED_STATE_RESOURCE
protected static final int CHANNEL_ACTIVE_STATE_RESOURCE
protected static final int CHANNEL_STARTED_STATE_RESOURCE
public static final int CHANNEL_OPENFAILED_RESOURCE
public static final int CHANNEL_CLOSED_RESOURCE
protected static final int CHANNEL_OPEN
protected static final int CHANNEL_READ_BYTES_RESOURCE
protected static final int CHANNEL_WRITE_BYTES_RESOURCE
protected ConfigurationService configurationService
protected long readByteCount
protected long writeByteCount
protected int logLevel
| Constructor Detail |
|---|
protected Connection()
Connection(ConfigurationService),
Connection(Dictionary)protected Connection(ConfigurationService configuration)
configuration - The configuration (ConfigurationService) parameter.Connection(),
Connection(Dictionary)protected Connection(java.util.Dictionary properties)
properties - The properties (Dictionary) parameter.Connection(),
Connection(ConfigurationService)| 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)
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)
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 int getLogLevel()
getLogLevel in class EscObjectint) value.setLogLevel(int)public long getReadByteCount()
long) value.setReadByteCount(long),
updateReadByteCount(long)public java.lang.String getResource(int resourceId)
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 setConfigurationInformation(java.util.Dictionary configurationInformation)
setConfigurationInformation in interface ConnectionServiceconfigurationInformation - The configuration information (Dictionary) parameter.public void setConfigurationService(ConfigurationService configurationService)
configurationService - The configuration service (ConfigurationService) parameter.getConfigurationService()public void setLogLevel(int logLevel)
logLevel - The log level (int) parameter.getLogLevel()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.
write in interface ConnectionServicebytes - The bytes (byte[]) parameter.
java.io.IOException - IOException.ConnectionService.write(byte[],int,int)
|
2009-01-09 1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||