Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.microsoft.bot.connector.sample</groupId>
<artifactId>bot-connector-sample</artifactId>
<groupId>com.microsoft.bot</groupId>
<artifactId>generator-botbuilder-java</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>

<parent>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-parent</artifactId>
<version>4.0.0-a0</version>
<relativePath>../../</relativePath>
<version>4.0.0</version>
<relativePath>../../../../../pom.xml</relativePath>
</parent>

<name>bot-connector-sample</name>
<name>generator-botbuilder-java</name>
<url>http://maven.apache.org</url>

<properties>
Expand Down Expand Up @@ -86,4 +86,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
28 changes: 14 additions & 14 deletions libraries/botbuilder/README.md → libraries/bot-builder/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

# Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
# Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
12 changes: 6 additions & 6 deletions libraries/botbuilder/pom.xml → libraries/bot-builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.microsoft.bot.builder</groupId>
<artifactId>botbuilder</artifactId>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
<packaging>jar</packaging>
<version>4.0-SNAPSHOT</version>

Expand Down Expand Up @@ -107,12 +107,12 @@
<version>0.3.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot.schema</groupId>
<artifactId>botbuilder-schema</artifactId>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-schema</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot.connector</groupId>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-connector</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
Expand Down Expand Up @@ -174,7 +174,7 @@
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<outputDirectory>../../cobertura-report/botbuilder</outputDirectory>
<outputDirectory>../../cobertura-report/bot-builder</outputDirectory>
<format>xml</format>
<maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
package com.microsoft.bot.builder;

import java.util.concurrent.CompletableFuture;

/**
* Helper class for defining middleware by using a delegate or anonymous method.
*/
public class AnonymousReceiveMiddleware implements Middleware
{
private MiddlewareCall _toCall;

/**
* Creates a middleware object that uses the provided method as its
* process request handler.
* @param anonymousMethod The method to use as the middleware's process
* request handler.
*/
public AnonymousReceiveMiddleware(MiddlewareCall anonymousMethod)
{
if (anonymousMethod == null)
throw new NullPointerException("MiddlewareCall anonymousMethod");
else
_toCall = anonymousMethod;
}

/**
* Uses the method provided in the {@link AnonymousReceiveMiddleware} to
* process an incoming activity.
* @param context The context object for this turn.
* @param next The delegate to call to continue the bot middleware pipeline.
* @return A task that represents the work queued to execute.
*/
public void OnTurn(TurnContext context, NextDelegate next) throws Exception {
_toCall.requestHandler(context, next);
}

}
package com.microsoft.bot.builder;
import java.util.concurrent.CompletableFuture;
/**
* Helper class for defining middleware by using a delegate or anonymous method.
*/
public class AnonymousReceiveMiddleware implements Middleware
{
private MiddlewareCall _toCall;
/**
* Creates a middleware object that uses the provided method as its
* process request handler.
* @param anonymousMethod The method to use as the middleware's process
* request handler.
*/
public AnonymousReceiveMiddleware(MiddlewareCall anonymousMethod)
{
if (anonymousMethod == null)
throw new NullPointerException("MiddlewareCall anonymousMethod");
else
_toCall = anonymousMethod;
}
/**
* Uses the method provided in the {@link AnonymousReceiveMiddleware} to
* process an incoming activity.
* @param context The context object for this turn.
* @param next The delegate to call to continue the bot middleware pipeline.
* @return A task that represents the work queued to execute.
*/
public void OnTurn(TurnContext context, NextDelegate next) throws Exception {
_toCall.requestHandler(context, next);
}
}
Loading