ServerChannel Class |
Namespace: OBCOM.NetClient
The ServerChannel type exposes the following members.
Name | Description | |
---|---|---|
ServerChannel |
Constructs a new ServerChannel instance.
|
Name | Description | |
---|---|---|
LayoutManager |
Returns the LayoutManager of the ServerChannel.
| |
MetaServerPID |
Returns the MetaServer Process ID of the ServerChannel.
| |
Name |
Returns the name of the ServerChannel.
| |
NetServerHost |
Returns OBCOM NetServer host address (name or IP number) of the ServerChannel.
| |
NetServerPort |
Returns OBCOM NetServer port number of the ServerChannel.
| |
NetServerURI |
Returns OBCOM NetServer URI (protocol, host and port) of the ServerChannel.
| |
ReplyMissing |
Returns true if no reply message has been sent for the current
transaction.
| |
SessionID |
Returns the session ID of the ServerChannel.
| |
Timeout |
Indicates the maximum time to wait for an event.
| |
TranBootHost |
Returns the boot host name of the current transaction.
| |
TranClientName |
Returns the client name of the current transaction.
| |
TranDefaultHost |
Returns the default host name of the current transaction.
| |
TranLocalHost |
Returns the local host name of the current transaction.
| |
TranOriginator |
Returns the originator name of the current transaction.
| |
TranOriginatorSession |
Returns the originator session name of the current transaction.
| |
TranOriginatorStation |
Returns the originator station name of the current transaction.
| |
TranProcessName |
Returns the process name of the current transaction.
| |
TranSecurityHost |
Returns the security host name of the current transaction.
| |
TranSequence |
Returns the sequence code of the current transaction.
| |
TranSessionID |
Returns the session ID of the current transaction.
| |
TranTimestamp |
Returns the timestamp of the current transaction.
| |
Version |
Returns the implementation version of the ServerChannel.
|
Name | Description | |
---|---|---|
BeginTransaction |
Called before a transaction request is processed by ProcessTransaction(String, Message).
| |
CancelTimer |
Cancels the execution of the ProcessTimer method.
| |
CommitTransaction |
Called after a transaction request has been successfuly processed by
the ProcessTransaction(String, Message) method.
| |
Connect(String, String) |
Connects the ServerChannel to OBCOM NetServer specified by the the
supplied arguments.
| |
Connect(String, String, LayoutManager) |
Connects the ServerChannel to OBCOM NetServer specified by the the
supplied arguments.
| |
Connect(String, String, String) |
Connects the ServerChannel to OBCOM NetServer specified by the the
supplied arguments.
| |
DisableMulticast |
Disables the reception of multicast messages identified by the specified
name.
| |
EnableMulticast(String) |
Enables the reception of multicast messages identified by the specified
name.
| |
EnableMulticast(String, MulticastListener) |
Enables the reception of multicast messages identified by the specified
name and supplied listener.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Execute(String, String) |
Starts the execution of this ServerChannel using the supplied arguments.
| |
Execute(String, String, LayoutManager) |
Starts the execution of this ServerChannel using the supplied arguments.
| |
Execute(String, String, String) |
Starts the execution of this ServerChannel using the supplied arguments.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetLayout |
Returns the Layout identified by the supplied layoutName.
| |
GetTimestamp |
Returns an OBCOM NetServer timestamp.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ProcessHalt |
Called when a Halt message is received from OBCOM NetServer.
| |
ProcessInit |
Called when an Initialize or Reinitialize message is received from OBCOM
NetServer.
| |
ProcessMulticast |
Called when a multicast message is received from OBCOM NetServer.
| |
ProcessOneWay |
Called when a one-way message is received.
| |
ProcessReply |
Called when an asynchronous transaction reply message is received from
OBCOM NetServer.
| |
ProcessTimeout |
Called when a Timeout Event occurs.
| |
ProcessTimer |
Called when a Timer Event occurs.
| |
ProcessTransaction |
Called when a transaction request message is received from OBCOM NetServer.
| |
RegisterTransaction |
Registers a listener for transactions identified by
name.
| |
ReleaseHold |
Releases the hold on this server so it can continue to receive
messages.
| |
RollbackTransaction |
Called when an exception is thrown while processing a
transaction.
| |
RunAsync |
Submits an action for later execution on the server's thread.
| |
SendAckReply |
Sends a transaction reply message with a ACK code, indicating successful completion
| |
SendConsole |
Sends a console command to OBCOM NetServer.
| |
SendError |
Sends an error report message to OBCOM NetServer.
| |
SendMulticast(String, Object) |
Sends a multicast message to OBCOM NetServer
| |
SendMulticast(String, Object, Boolean) |
Sends an multicast message to OBCOM NetServer with encryption option.
| |
SendNakReply |
Sends a transaction reply message with a NAK code, indicating unsuccessful
completion
| |
SendOneWay(String, Object) |
Sends a one-way message to the named destination.
| |
SendOneWay(String, Object, Boolean) |
Sends a one-way message to the named destination with encryption.
| |
SendOperator |
Sends a operator command to OBCOM NetServer.
| |
SendReply(Object, Int32) |
Sends a transaction reply message with the supplied replyCode.
| |
SendReply(Object, Int32, Boolean) |
Sends a transaction reply message with the supplied
replyCode and required server hold
state.
| |
SendRequest(String, Object) |
Sends an asynchronous transaction to the specified service with supplied request data.
| |
SendRequest(String, Object, ReplyListener) |
Sends an asynchronous transaction to the specified service with supplied request data and
listener.
| |
SendRequest(String, Object, ReplyListener, Object) |
Sends an asynchronous transaction to the specified service with supplied request data,
listener and context.
| |
SendTransaction(String, Object) |
Sends an synchronous transaction request to the specified service using the supplied request data
| |
SendTransaction(String, Object, Int32) |
Sends an synchronous transaction to the specified service with supplied request data and
timeout option.
| |
StartTimer(Double) |
Schedules the execution of the ProcessTimer method of the
ServerChannel at approximately regular intervals separated by interval.
| |
StartTimer(Double, TimerListener) |
Schedules the execution of the ProcessTimer method of the
supplied listener at approximately regular intervals
separated by interval.
| |
Stop |
Stops the execution of this ServerChannel.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UnregisterTransaction |
Unregisters the transaction listener identified by name.
|
Once the communcation is established with the NetServer, the application is able to receive transaction requests, send unsolicited data, and provide other services to the clients of an NetServer.
A server application is constructed by extending the ServerChannel class and then overriding the ProcessXXXXXXX methods. For example, the ProcessTransaction method is called each time the server receives a transaction request from an NetServer client application (see ClientChannel for details about building NetServer client applications).
The following example uses ServerChannel to implement a server application named "SampleServer". This server is very simple: it just echos the data received in all transaction requests:
using OBCOM.NetClient; public class SampleServer : ServerChannel { // Called when a transaction request arrives public override void ProcessTransaction(string name, Message message) { SendAckReply("The reply message is " + message.Data); } // Startup method of SampleServer public static void Main(string[] args) { SampleServer server = new SampleServer(); server.Execute("CSERVER", "nets://host:10102", "http://host/layouts/*.jsp"); } }