|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JCoServer
JCo Server APIs. The JCoServer interface provides access to the public APIs in the JCo server implementation. Applications implementing server applications use the JCoServerFactory to create an instance of the JCoServer. Once the server instance is created, the application can customize and then start it. The connections will be opened asynchronously. JCoServer provides the following features:
JCoServerFactory.getServer(String)
Method Summary | |
---|---|
void |
addServerErrorListener(JCoServerErrorListener listener)
Adds an error listener to the list of listeners. If a listener is removed from the list of listeners during firing of an event, it will be notified about the last event. |
void |
addServerExceptionListener(JCoServerExceptionListener listener)
Adds an exception listener to the list of listeners. If a listener is added as listener during firing of an event, it wont be notified about the last event. |
void |
addServerStateChangedListener(JCoServerStateChangedListener listener)
Adds a state changed listener to the list of listeners. If a listener is removed from the list of listeners during firing of an event, it will be notified about the last event. |
JCoServerCallHandlerFactory |
getCallHandlerFactory()
|
int |
getConnectionCount()
returns the initial connection count for this server |
java.lang.String |
getGatewayHost()
Returns the gateway host as defined by the server configuration. |
java.lang.String |
getGatewayService()
Returns the gateway service (or port) as defined by the server configuration. |
JCoServerMonitor |
getMonitor()
|
java.lang.String |
getMySncName()
Returns the SNC name as defined by the server configuration. |
java.lang.String |
getProgramID()
Returns the program id as defined by the server configuration. |
java.lang.String |
getProperty(java.lang.String key)
Returns the value for a property defined by the server configuration. |
JCoRepository |
getRepository()
Returns the default repository instance used by this server instance. |
JCoRepository |
getRepository(JCoServerContextInfo serverContext)
Returns the repository instance used by this server instance for the specified request context. |
java.lang.String |
getRepositoryDestination()
Returns the repository destination name for obtaining the default repository. |
java.lang.String |
getSAPRouterString()
Returns the SAP-Router string as defined by the server configuration. |
JCoServerSecurityHandler |
getSecurityHandler()
|
JCoServerThreadStarter |
getServerThreadStarter()
|
java.lang.String |
getSncLibrary()
Returns the path to the SNC library as defined by the server configuration. |
boolean |
getSncMode()
Returns true if the server is configured to use SNC connection. |
int |
getSncQOP()
Returns the QOP level of SNC as defined by the server configuration. |
JCoServerState |
getState()
Returns the current state of the server instance. |
JCoThroughput |
getThroughput()
Returns the throughput instance |
JCoServerTIDHandler |
getTIDHandler()
|
JCoServerUnitIDHandler |
getUnitIDHandler()
Returns the current unit ID handler. |
boolean |
isValid()
Returns true if the corresponding server configuration was neither changed nor removed, false otherwise. |
void |
release()
Releases all resources allocated by the server instance. |
void |
removeServerErrorListener(JCoServerErrorListener listener)
Removes an error listener from the list of listeners. If a listener is removed from the list of listeners during firing of an event, it will be notified about the last event. |
void |
removeServerExceptionListener(JCoServerExceptionListener listener)
Removes an exception listener from the list of listeners. If a listener is removed from the list of listeners during firing of an event, it will be notified about the last event. |
void |
removeServerStateChangedListener(JCoServerStateChangedListener listener)
Removes a state changed listener from the list of listeners. If a listener is removed from the list of listeners during firing of an event, it will be notified about the last event. |
void |
removeThroughput()
Removes the throughput instance from the server. |
void |
setCallHandlerFactory(JCoServerCallHandlerFactory callHandlerFactory)
Defines the call handler factory that will be used by the JCo runtime to get a handler instance if a remote call is invoked. |
void |
setConnectionCount(int count)
Defines the count of the registered connections managed by this server instance. |
void |
setRepository(JCoDestination destination)
Sets the destination instance which is used for obtaining the default repository for querying RFC meta data. |
void |
setRepository(JCoRepository repository)
Sets the default repository instance which is being used for querying RFC meta data. |
void |
setRepository(java.lang.String sID,
java.lang.String client,
JCoDestination destination)
Sets the repository destination instance for incoming RFC calls from the system with the system ID SID and - if defined - with the appropriate client. |
void |
setRepository(java.lang.String sID,
java.lang.String client,
JCoRepository repository)
Sets the repository instance for incoming RFC calls from the system with the system ID SID and - if defined - with the appropriate client. |
void |
setSecurityHandler(JCoServerSecurityHandler securityManager)
Defines the security handler for this server instance. |
void |
setServerThreadStarter(JCoServerThreadStarter starter)
Defines the instance that will starts the server runnable instance. |
void |
setThroughput(JCoThroughput throughput)
sets the throughput instance to measure the calls dispatched by this server The previously defined throughput instance will be overwritten. |
void |
setTIDHandler(JCoServerTIDHandler tidHandler)
Allow to specify the TID handler. |
void |
setUnitIDHandler(JCoServerUnitIDHandler unitIDHandler)
Allow to specify the unit ID handler. |
void |
start()
Starts the server. |
void |
stop()
Stops the server. |
Method Detail |
---|
void start()
setConnectionCount(int)
void stop()
setConnectionCount(int)
void setConnectionCount(int count)
int getConnectionCount()
void release()
JCoRuntimeException
- in case some workers are still runningJCoRepository getRepository()
JCoRepository getRepository(JCoServerContextInfo serverContext)
serverContext
- request context
void setRepository(JCoDestination destination)
setRepository(JCoRepository)
will be overwritten by this method.
destination
- a destination being used for obtaining the default repositoryvoid setRepository(JCoRepository repository)
setRepository(JCoDestination)
will be overwritten by this method.
repository
- either a custom repository or a repository connected to an ABAP servervoid setRepository(java.lang.String sID, java.lang.String client, JCoDestination destination) throws JCoRuntimeException
setRepository(String, String, JCoRepository)
will be overwritten by this method.
sID
- system ID of the SAP ABAP System containing exactly 3-lettersclient
- null or the client containing exactly 3 digitsdestination
- destination instance to be used for obtaining a repository if sID and client are matching
JCoRuntimeException
- is thrown if sID or client is illegal.void setRepository(java.lang.String sID, java.lang.String client, JCoRepository repository) throws JCoRuntimeException
setRepository(String, String, JCoDestination)
will be overwritten by this method.
sID
- system ID of the SAP ABAP System containing exactly 3-lettersclient
- null or the client containing exactly 3 digitsrepository
- repository instance to be used if sID and client are matching
JCoRuntimeException
- is thrown if sID or client is illegal.java.lang.String getGatewayHost()
java.lang.String getGatewayService()
java.lang.String getSAPRouterString()
java.lang.String getProgramID()
boolean getSncMode()
java.lang.String getMySncName()
int getSncQOP()
java.lang.String getSncLibrary()
java.lang.String getProperty(java.lang.String key)
java.lang.String getRepositoryDestination()
void setCallHandlerFactory(JCoServerCallHandlerFactory callHandlerFactory)
callHandlerFactory
- to be use by the serverDefaultServerHandlerFactory
JCoServerCallHandlerFactory getCallHandlerFactory()
void setTIDHandler(JCoServerTIDHandler tidHandler)
tidHandler
- instance implementation the TID handlingJCoServerTIDHandler getTIDHandler()
void setUnitIDHandler(JCoServerUnitIDHandler unitIDHandler)
unitIDHandler
- JCoServerUnitIDHandler getUnitIDHandler()
void setSecurityHandler(JCoServerSecurityHandler securityManager)
JCoServerSecurityHandler getSecurityHandler()
void setServerThreadStarter(JCoServerThreadStarter starter)
starter
- instance that starts new server worker threadsJCoServerThreadStarter getServerThreadStarter()
void addServerErrorListener(JCoServerErrorListener listener)
listener
- the listener to addremoveServerErrorListener(com.sap.conn.jco.server.JCoServerErrorListener)
void addServerExceptionListener(JCoServerExceptionListener listener)
listener
- the listener to addremoveServerExceptionListener(com.sap.conn.jco.server.JCoServerExceptionListener)
void addServerStateChangedListener(JCoServerStateChangedListener listener)
listener
- the listener to addremoveServerStateChangedListener(com.sap.conn.jco.server.JCoServerStateChangedListener)
void removeServerErrorListener(JCoServerErrorListener listener)
listener
- the listener to removeaddServerErrorListener(com.sap.conn.jco.server.JCoServerErrorListener)
void removeServerExceptionListener(JCoServerExceptionListener listener)
listener
- the listener to removeaddServerExceptionListener(com.sap.conn.jco.server.JCoServerExceptionListener)
void removeServerStateChangedListener(JCoServerStateChangedListener listener)
listener
- the listener to removeaddServerStateChangedListener(com.sap.conn.jco.server.JCoServerStateChangedListener)
void setThroughput(JCoThroughput throughput)
throughput
- JCoThroughput getThroughput()
void removeThroughput()
JCoServerMonitor getMonitor()
JCoServerState getState()
boolean isValid()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |