Oracle Application Server Wireless Java API Reference
B14043-01


oracle.edge.driver
Class SocketDevice

java.lang.Object
  extended byAbstractEdgeExtensionImpl
      extended byoracle.edge.driver.AbstractDevice
          extended byoracle.edge.driver.SocketDevice

All Implemented Interfaces:
Device, EdgeExtension, java.lang.Runnable

public abstract class SocketDevice
extends AbstractDevice

Abstract device entity that communicates with edge server through tcp/ip socket.

See Also:
Serialized Form

Field Summary

Fields inherited from class oracle.edge.driver.AbstractDevice
INSTRUCTION_RESP_FAILURE_CODE, INSTRUCTION_RESP_SUCCESS_CODE

Fields inherited from interface oracle.edge.common.EdgeExtension
DEVICE_DRIVER_TYPE, DISPATCHER_TYPE, FILTER_TYPE

Constructor Summary
SocketDevice()

Method Summary
void destroy()
Cleanup upon destroy of this device.<br/> The method will be called internally by DriverManager <p/>
abstract java.lang.String prepareInstructionStream(Event CurInstruction)
Provides mechanism to encode instruction content to be sent to the corresponding physical device.
void processInstruction(Event CurInstruction)
Provides mechanism to send an instruction to the corresponding physical device.
java.lang.String readFromDevice()
Provides mechanism to obtain content from the corresponding physical device.
void start()
Start device operation.
void stop()
Stop device operation.

Methods inherited from class oracle.edge.driver.AbstractDevice
interpretInstructionProcessResult, processEvents, run

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface oracle.edge.driver.Device
isAlive

Methods inherited from interface oracle.edge.common.EdgeExtension
getDescription, getName, getVersion, init

Constructor Detail

SocketDevice

public SocketDevice()

Method Detail

destroy

public void destroy()
             throws DeviceException
Cleanup upon destroy of this device.<br/> The method will be called internally by DriverManager <p/>
Specified by:
destroy in interface EdgeExtension
Overrides:
destroy in class AbstractDevice
Throws:
DeviceException - excpetion thrown upon cleanup failure.

prepareInstructionStream

public abstract java.lang.String prepareInstructionStream(Event CurInstruction)
                                                   throws DeviceException
Provides mechanism to encode instruction content to be sent to the corresponding physical device. <br/> This method has to be implemented by any device driver directly extended from this class. <p/>
Returns:
encoded instruction string.
Throws:
DeviceException

processInstruction

public void processInstruction(Event CurInstruction)
                        throws DeviceException
Provides mechanism to send an instruction to the corresponding physical device. <br/> <p/>
Specified by:
processInstruction in interface Device
Specified by:
processInstruction in class AbstractDevice
Parameters:
CurInstruction - an instruction to be sent.
Throws:
DeviceException

readFromDevice

public java.lang.String readFromDevice()
                                throws DeviceException
Provides mechanism to obtain content from the corresponding physical device. <br/> <p/>
Specified by:
readFromDevice in class AbstractDevice
Returns:
content obtained from physical device.
Throws:
DeviceException

start

public void start()
           throws DeviceException
Start device operation. <br/> This method will be called by DriverManager after this device is registered and edge server is started. <p/>
Specified by:
start in interface EdgeExtension
Overrides:
start in class AbstractDevice
Throws:
DeviceException - exception is thrown if this device fails to start up.

stop

public void stop()
          throws DeviceException
Stop device operation. <p/>
Specified by:
stop in interface EdgeExtension
Overrides:
stop in class AbstractDevice
Throws:
DeviceException

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.