Constructor and Description |
---|
BServerInstance(BalServer balServer) |
Modifier and Type | Method and Description |
---|---|
void |
addLogLeecher(LogLeecher leecher)
Add a Leecher which is going to listen to an expected text.
|
String |
getServerHome()
Return server home path.
|
String |
getServiceURLHttp(int port,
String servicePath)
A utility method to construct and return the HTTP service URL by using the given port.
|
String |
getServiceURLHttps(int port,
String servicePath)
A utility method to construct and return the HTTPS service URL by using the given port.
|
void |
killServer()
Kill the server instance which is started by start method.
|
void |
removeAllLeechers()
Removes all added log leechers from this instance.
|
void |
shutdownServer()
Stop the server instance which is started by start method.
|
void |
startServer(String balFile)
Start ballerina server passing provided .bal files.
|
void |
startServer(String balFile,
int[] requiredPorts)
Start ballerina server passing provided .bal files.
|
void |
startServer(String sourceRoot,
String packagePath)
Start ballerina server passing provided bal package.
|
void |
startServer(String balFile,
String[] args,
int[] requiredPorts)
Start ballerina server passing provided .bal files.
|
void |
startServer(String balFile,
String[] args,
Map<String,String> envProperties,
int[] requiredPorts)
Start ballerina server passing provided .bal files.
|
void |
startServer(String sourceRoot,
String packagePath,
int[] requiredPorts)
Start ballerina server passing provided bal package.
|
void |
startServer(String sourceRoot,
String packagePath,
String[] args,
int[] requiredPorts)
Start ballerina server passing provided bal package.
|
void |
startServer(String sourceRoot,
String packagePath,
String[] args,
Map<String,String> envProperties,
int[] requiredPorts)
Start ballerina server passing provided bal package.
|
public BServerInstance(BalServer balServer) throws BallerinaTestException
BallerinaTestException
public void startServer(String balFile) throws BallerinaTestException
BServer
startServer
in interface BServer
balFile
- bal file pathBallerinaTestException
- if services start failspublic void startServer(String balFile, int[] requiredPorts) throws BallerinaTestException
BServer
startServer
in interface BServer
balFile
- bal file pathrequiredPorts
- ports required for the server instanceBallerinaTestException
- if services start failspublic void startServer(String balFile, String[] args, int[] requiredPorts) throws BallerinaTestException
BServer
startServer
in interface BServer
balFile
- bal file pathargs
- arguments to passrequiredPorts
- ports required for the server instanceBallerinaTestException
- if services start failspublic void startServer(String balFile, String[] args, Map<String,String> envProperties, int[] requiredPorts) throws BallerinaTestException
BServer
startServer
in interface BServer
balFile
- bal file pathargs
- arguments to passenvProperties
- environment propertiesrequiredPorts
- ports required for the server instanceBallerinaTestException
- if services start failspublic void startServer(String sourceRoot, String packagePath) throws BallerinaTestException
BServer
startServer
in interface BServer
sourceRoot
- source root directorypackagePath
- package pathBallerinaTestException
- if starting failspublic void startServer(String sourceRoot, String packagePath, int[] requiredPorts) throws BallerinaTestException
BServer
startServer
in interface BServer
sourceRoot
- source root directorypackagePath
- package pathrequiredPorts
- ports required for the server instanceBallerinaTestException
- if starting failspublic void startServer(String sourceRoot, String packagePath, String[] args, int[] requiredPorts) throws BallerinaTestException
BServer
startServer
in interface BServer
sourceRoot
- source root directorypackagePath
- package pathargs
- arguments to parserequiredPorts
- ports required for the server instanceBallerinaTestException
- if starting failspublic void startServer(String sourceRoot, String packagePath, String[] args, Map<String,String> envProperties, int[] requiredPorts) throws BallerinaTestException
BServer
startServer
in interface BServer
sourceRoot
- source root directorypackagePath
- package pathargs
- arguments to parseenvProperties
- environment propertiesrequiredPorts
- ports required for the server instanceBallerinaTestException
- if starting failspublic void shutdownServer() throws BallerinaTestException
shutdownServer
in interface BServer
BallerinaTestException
- if service stop failspublic void killServer() throws BallerinaTestException
killServer
in interface BServer
BallerinaTestException
- if service stop failspublic String getServerHome()
public String getServiceURLHttp(int port, String servicePath)
port
- - the port to be used to create the service url.servicePath
- - http url of the given service.public String getServiceURLHttps(int port, String servicePath)
port
- - the port to be used to create the service url.servicePath
- - http url of the given service.public void addLogLeecher(LogLeecher leecher)
leecher
- The Leecher instancepublic void removeAllLeechers()
Copyright © 2018 WSO2. All rights reserved.