wt.method
Class WTAdapter

java.lang.Object
  extended bywt.method.WTAdapter
All Implemented Interfaces:
AppletListener, Runnable

public class WTAdapter
extends Object
implements Runnable, AppletListener

The Windchill Info*Engine adapter listener. This class contains the main method executed when starting a Windchill Adapter.

Supported API: true
Extendable: false


Nested Class Summary
private  class WTAdapter.ListeningThread
          Define a Thread subclass that the adapter will use in listening for requests from remote Info*Engine servers.
 
Field Summary
static boolean ADAPTER_INITIALIZED
           
private  boolean AUTO_REGISTRATION_ENABLED
           
private  int CLIENT_TIMEOUT
           
private  int CONCURRENT_METHOD_SERVERS
           
private static int DEFAULT_PORT
           
private  String DEFAULT_USER
           
private  int GC_INTERVAL
           
private  String IEADAPTER
           
private  int LISTEN_PORT
           
protected  ServerSocket listen_socket
           
private  String LOAD_OBJECTS
           
private  boolean LOG_APPEND
           
private  boolean LOG_ENABLED
           
private  String LOG_FILE
           
private  boolean LOG_TEE
           
private  int MAX_PORT
           
private  int MAX_SOCKETS
           
private  int MIN_PORT
           
private  String SERVICE_NAME
           
private  boolean SERVICES_ENABLED
           
private  String SERVICES_HANDLER
           
private  ServicesHandlerIfc servicesHandler
           
private  String TIME_ZONE
           
private  boolean VERBOSE_CLIENT
           
private  boolean VERBOSE_SERVER
           
private  boolean VERBOSE_SOCKET
           
private  boolean VERBOSE_SOCKET_IO
           
private static String versionID
           
private static int wtAdapterPort
           
 
Constructor Summary
WTAdapter()
          Constructs a new Windchill Adapter instance that runs within the JVM of another process such as a conventional Windchill MethodServer.
WTAdapter(WTProperties properties)
          Deprecated.  
 
Method Summary
private  void autoRegister(String vmName, ObjectDestination[] serviceAddresses)
          Attempt to create and register as many new service addresses as are needed to accommodate the number of MethodServers that are configured to run concurrently.
 void destroy()
          Supported API: false
static int getWtAdapterPort()
           
private  void initialize()
           
 void run()
          The body of the server thread.
 void start()
          Supported API: false
 void stop()
          Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

DEFAULT_PORT

private static final int DEFAULT_PORT
See Also:
Constant Field Values

IEADAPTER

private final String IEADAPTER
See Also:
Constant Field Values

servicesHandler

private ServicesHandlerIfc servicesHandler

listen_socket

protected ServerSocket listen_socket

ADAPTER_INITIALIZED

public static boolean ADAPTER_INITIALIZED

AUTO_REGISTRATION_ENABLED

private boolean AUTO_REGISTRATION_ENABLED

CONCURRENT_METHOD_SERVERS

private int CONCURRENT_METHOD_SERVERS

CLIENT_TIMEOUT

private int CLIENT_TIMEOUT

DEFAULT_USER

private String DEFAULT_USER

GC_INTERVAL

private int GC_INTERVAL

LISTEN_PORT

private int LISTEN_PORT

LOAD_OBJECTS

private String LOAD_OBJECTS

LOG_APPEND

private boolean LOG_APPEND

LOG_ENABLED

private boolean LOG_ENABLED

LOG_FILE

private String LOG_FILE

LOG_TEE

private boolean LOG_TEE

MAX_PORT

private int MAX_PORT

MAX_SOCKETS

private int MAX_SOCKETS

MIN_PORT

private int MIN_PORT

SERVICE_NAME

private String SERVICE_NAME

SERVICES_ENABLED

private boolean SERVICES_ENABLED

SERVICES_HANDLER

private String SERVICES_HANDLER

TIME_ZONE

private String TIME_ZONE

VERBOSE_CLIENT

private boolean VERBOSE_CLIENT

VERBOSE_SERVER

private boolean VERBOSE_SERVER

VERBOSE_SOCKET

private boolean VERBOSE_SOCKET

VERBOSE_SOCKET_IO

private boolean VERBOSE_SOCKET_IO

wtAdapterPort

private static int wtAdapterPort
Constructor Detail

WTAdapter

public WTAdapter()
Constructs a new Windchill Adapter instance that runs within the JVM of another process such as a conventional Windchill MethodServer.


WTAdapter

public WTAdapter(WTProperties properties)
Deprecated.  

Constructs a new Windchill Adapter instance based on the input properties. This constructor is used when an adapter instance is started in its own JVM. This constructor is deprecated. The adapter should be configured to run as an embedded function of the MethodServer.

Method Detail

getWtAdapterPort

public static int getWtAdapterPort()

start

public void start()
Supported API: false

Specified by:
start in interface AppletListener

destroy

public void destroy()
Supported API: false

Specified by:
destroy in interface AppletListener

stop

public void stop()
Supported API: false

Specified by:
stop in interface AppletListener

initialize

private void initialize()
                 throws WTException
Throws:
WTException

run

public void run()
The body of the server thread. Loop forever, listening for and accepting connections from clients. For each connection, create an AdapterThread object to handle communication through the new Socket. This method is called only when the adapter is running in its own JVM.

Specified by:
run in interface Runnable

autoRegister

private void autoRegister(String vmName,
                          ObjectDestination[] serviceAddresses)
Attempt to create and register as many new service addresses as are needed to accommodate the number of MethodServers that are configured to run concurrently.