com.ascert.comms.driver.farsite
Class X25FactoryImpl
java.lang.Object
|
+--com.ascert.comms.driver.farsite.X25FactoryImpl
- All Implemented Interfaces:
- X25Factory
- public class X25FactoryImpl
- extends java.lang.Object
- implements X25Factory
Contains the X25Factory
implementation for the FarSync range of X.25 cards. Instances of this class can be used to create X25Socket
objects that can create and use X.25 connections using the FarSync card.
Low level JNI libraries are provided for Windows (farsite.dll
) and Linux (libfarsite.so
) which perform the require low level API operations to communicate with the FarSync card. The appropriate JNI library will be loaded on initial loading of this class. The specific class loader which loads this class must be able to locate the JNI library using one of the standard mechanisms for loading native libraries (e.g. via the standard Java java.library.path
system property).
If there is a need to rename the native libraries for any reason, the default library names can be overriden by setting the com.ascert.comms.driver.farsite.libname
system property to the name of the new library. This name must be a filename only, and must be in a platform indepdent form (e.g. on Windows, use newfarsite
if the library is renamed to newfarsite.dll
).
- Since:
- 1.00
- Version:
- 1.00, 21 May 2003
- Author:
- Rob Walker
Field Summary |
static boolean |
libLoaded
Indicates status of low level FarSync JNI loaded. |
static java.lang.String |
LIBNAME_PROPERTY
System property to allow override of FarSync native library name |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
libLoaded
public static boolean libLoaded
- Indicates status of low level FarSync JNI loaded.
LIBNAME_PROPERTY
public static final java.lang.String LIBNAME_PROPERTY
- System property to allow override of FarSync native library name
- See Also:
- Constant Field Values
X25FactoryImpl
public X25FactoryImpl()
getSocket
public X25Socket getSocket()
throws java.io.IOException
- Description copied from interface:
X25Factory
- Creates a new X25Socket object using this factory. Specific details of what kinds of socket object are returned, and how they are created will be encapsulated within each driver's implementation of this factory.
- Specified by:
getSocket
in interface X25Factory
- Returns:
- a newly created X25Socket object
- Throws:
java.io.IOException
- if an error occurs creating a new X25Socket