i-net Konnekter

com.inet.jj.srv
Class JavaCommandFactory

java.lang.Object
  extended bycom.inet.jj.srv.JavaCommandFactory

public class JavaCommandFactory
extends java.lang.Object

This class is the factory for your Statements, PreparedStatements or CallableStatements. The return values are ever a JavaCommand because it implements additonal methods and you don't need to implement all the methods that you not needed.
The JavaCommandFactory need to be added to the i-net Konnecter Server command list with the method addCommand.

See Also:
JJServer.addCommand(String, JavaCommandFactory)

Constructor Summary
JavaCommandFactory()
           
 
Method Summary
 JavaCommand prepareCallCommand(java.sql.Connection con)
          This method will be called from i-net Konnekter if the client calls the corresponded method prepareCallCommand() from JJConnection.
 JavaCommand prepareCallCommand(java.sql.Connection con, int rsType, int rsConcur)
          This method will be called from i-net Konnekter if the client calls the corresponded method prepareCallCommand() from JJConnection.
 JavaCommand prepareCommand(java.sql.Connection con)
          This method will be called from i-net Konnekter if the client calls the corresponded method prepareCommand() from JJConnection.
 JavaCommand prepareCommand(java.sql.Connection con, int rsType, int rsConcur)
          This method will be called from i-net Konnekter if the client calls the corresponded method prepareCommand() from JJConnection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaCommandFactory

public JavaCommandFactory()
Method Detail

prepareCommand

public JavaCommand prepareCommand(java.sql.Connection con)
                           throws java.sql.SQLException
This method will be called from i-net Konnekter if the client calls the corresponded method prepareCommand() from JJConnection. You need only to override it and to return your own JavaCommand object which will handle the client's requests. If you not override this method it throws an SQL exception.

Parameters:
con - The real connection object that the client referenced.
Returns:
A new instance of your JavaCommand. The Client receive a reference of it.
Throws:
java.sql.SQLException - You can throw an exception to the client.
See Also:
JJConnection.prepareCommand(String, int)

prepareCommand

public JavaCommand prepareCommand(java.sql.Connection con,
                                  int rsType,
                                  int rsConcur)
                           throws java.sql.SQLException
This method will be called from i-net Konnekter if the client calls the corresponded method prepareCommand() from JJConnection. You need only to override it and to return your own JavaCommand object which will handle the client's requests. If you not override this method it throws an SQL exception.

Parameters:
con - The real connection object that the client referenced.
rsType - a result set type; see ResultSet.TYPE_XXX
rsConcur - a concurrency type; see ResultSet.CONCUR_XXX
Returns:
A new instance of your JavaCommand. The Client receive a reference of it.
Throws:
java.sql.SQLException - You can throw an exception to the client.
See Also:
JJConnection.prepareCommand(String, int, int, int)

prepareCallCommand

public JavaCommand prepareCallCommand(java.sql.Connection con)
                               throws java.sql.SQLException
This method will be called from i-net Konnekter if the client calls the corresponded method prepareCallCommand() from JJConnection. You need only to override it and to return your own JavaCommand object which will handle the client's requests. If you not override this method it throws an SQL exception.

Parameters:
con - The real connection object that the client referenced.
Returns:
A new instance of your JavaCommand. The Client receive a reference of it.
Throws:
java.sql.SQLException - You can throw an exception to the client.
See Also:
JJConnection.prepareCallCommand(String, int)

prepareCallCommand

public JavaCommand prepareCallCommand(java.sql.Connection con,
                                      int rsType,
                                      int rsConcur)
                               throws java.sql.SQLException
This method will be called from i-net Konnekter if the client calls the corresponded method prepareCallCommand() from JJConnection. You need only to override it and to return your own JavaCommand object which will handle the client's requests. If you not override this method it throws an SQL exception.

Parameters:
con - The real connection object that the client referenced.
rsType - a result set type; see ResultSet.TYPE_XXX
rsConcur - a concurrency type; see ResultSet.CONCUR_XXX
Returns:
A new instance of your JavaCommand. The Client receive a reference of it.
Throws:
java.sql.SQLException - You can throw an exception to the client.
See Also:
JJConnection.prepareCallCommand(String, int, int, int)

i-net Konnekter


copyright by i-net software