All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.syncbuilder.internal.sync.NativeSocketImpl
java.lang.Object
   |
   +----com.syncbuilder.sync.SocketImpl
           |
           +----com.syncbuilder.internal.sync.NativeSocketImpl

  Summary

public class  NativeSocketImpl
     extends com.syncbuilder.sync.SocketImpl
{
          // Constructors 1
     public NativeSocketImpl();

          // Methods 13
     public synchronized void accept(SocketImpl) throws IOException;
     public synchronized void accept(SocketImpl, int) throws IOException;
     public synchronized void bind(String) throws IOException;
     public synchronized void close() throws IOException, DlpException;
     public void create() throws IOException;
     public int getDescriptor();
     public synchronized int getVersion() throws IOException;
     public boolean isOpen();
     public synchronized void listen(int) throws IOException;
     public synchronized int read(byte[], int) throws IOException;
     public synchronized void startWatchdog(int) throws IOException;
     public synchronized void tickle() throws IOException;
     public synchronized int write(byte[], int) throws IOException;
}

The implementation details of the Sockets which use the pilot-link native sockets.
This is to be considered an intermediary solution until the Pure Java implementations are ready for prime-time.




  Constructors

· NativeSocketImpl

Summary  |  Top

   public NativeSocketImpl() 

Only NativeSocketImplFactory shall instantiate this class.



  Methods

· isOpen

Summary  |  Top
   public boolean isOpen() 
Overrides:
isOpen in class SocketImpl


· getVersion

Summary  |  Top
   public synchronized int getVersion()  throws IOException
Overrides:
getVersion in class SocketImpl


· tickle

Summary  |  Top
   public synchronized void tickle()  throws IOException

"Tickle" the PalmPilot in order to keep the connection alive. This can be automated through startWatchdog.

Overrides:
tickle in class SocketImpl

See Also: startWatchdog



· startWatchdog

Summary  |  Top
   public synchronized void startWatchdog(int interval)  throws IOException

Tickle the PalmPilot automatically in specified intervals

Overrides:
startWatchdog in class SocketImpl

See Also: tickle



· getDescriptor

Summary  |  Top
   public int getDescriptor() 

Return the socket descriptor. This is for internal purposes only! This descriptor is only meaningful to the native pilot-link code.

This method will go away as soon as the DLP can offer all functionality through java.io-streams.

Overrides:
getDescriptor in class SocketImpl


· read

Summary  |  Top
   public synchronized int read(byte[] data, 
                                int len)  throws IOException

Read a specified number of bytes into the specified array.

Overrides:
read in class SocketImpl


· write

Summary  |  Top
   public synchronized int write(byte[] data, 
                                 int len)  throws IOException

Write a specified number of bytes from the specified array.

Overrides:
write in class SocketImpl


· accept

Summary  |  Top
   public synchronized void accept(SocketImpl impl, 
                                   int timeout)  throws IOException

Fill in the socket-descriptor of the supplied SocketImpl. This implies that the SocketImpl is a NativeSocketImpl. This method is only there in order to comply with the SocketImpl-interface. The timeout parameter is not supported and values other than 0 will lead to an IllegalArgumentException!

Overrides:
accept in class SocketImpl


· accept

Summary  |  Top
   public synchronized void accept(SocketImpl impl)  throws IOException

Fill in the socket-descriptor of the supplied SocketImpl. This implies that the SocketImpl is a NativeSocketImpl.

Overrides:
accept in class SocketImpl


· bind

Summary  |  Top
   public synchronized void bind(String device)  throws IOException
Overrides:
bind in class SocketImpl


· listen

Summary  |  Top
   public synchronized void listen(int backlog)  throws IOException
Overrides:
listen in class SocketImpl


· close

Summary  |  Top
   public synchronized void close()  throws IOException, DlpException
Overrides:
close in class SocketImpl


· create

Summary  |  Top
   public void create()  throws IOException

Switch the SocketImpl into ServerSocket-mode

Overrides:
create in class SocketImpl


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7