Skip to content

Commit

Permalink
Merge pull request #19 from tvd12/master
Browse files Browse the repository at this point in the history
release version 1.0.7
  • Loading branch information
tvd12 authored Jul 12, 2016
2 parents 405bb9f + 20e51c2 commit 76acc13
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Let's say you want to listen a "bet" request from client and you also you want t
@ResponseParam("2")
private int roomId;

public void execute(AppContext context, VideoPokerUser user) {
public void execute(AppContext context, MyUser user) {
MyRoom room =
context.command(FindRoom.class).by(roomId);
context.command(Log.class).from(this).info("user {} has just betted {} chips",
Expand Down Expand Up @@ -143,7 +143,7 @@ We must spend a lot of time to declare, init variables. Some time we also have t
<dependency>
<groupId>com.tvd12</groupId>
<artifactId>ezyfox-core</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>com.tvd12</groupId>
<artifactId>ezyfox-core</artifactId>
<version>1.0.6-SNAPSHOT</version>
<version>1.0.7-SNAPSHOT</version>
<packaging>jar</packaging>

<name>ezyfox-core</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ public interface DisconnectUser extends BaseCommand {

/**
* Disconnect reason id
* IDLE(0), KICK(1), BAN(2), UNKNOWN(3);
*
* @param id id
* @return this pointer
*/
DisconnectUser reasonId(byte id);
DisconnectUser reason(byte id);

}
16 changes: 16 additions & 0 deletions src/main/java/com/tvd12/ezyfox/core/command/GetCurrentFolder.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
*
*/
package com.tvd12.ezyfox.core.command;

/**
* Return the relative path to the current extension folder
* Typically this will return: extensions/{name-of-extension}/
* The path is relative to the Server root folder and it can be used to load external data files that are stored together with the extension jar file(s)
*
* @author tavandung12
*
*/
public interface GetCurrentFolder extends BaseCommand {

}
76 changes: 76 additions & 0 deletions src/main/java/com/tvd12/ezyfox/core/command/PingClient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
package com.tvd12.ezyfox.core.command;

import com.tvd12.ezyfox.core.entities.ApiBaseUser;

/**
* Run this command to ping client
*
* @author tavandung12
*
*/

public interface PingClient {

/**
* set delay time
*
* @param time delay time
* @return this pointer
*/
PingClient delay(long time);

/**
* set schedule on time or not
*
* @param value true or false
* @return this pointer
*/
PingClient oneTime(boolean value);

/**
* set period
*
* @param value period
* @return this pointer
*/
PingClient period(long value);

/**
* set task
*
* @param value a task
* @return this pointer
*/
PingClient callback(Runnable value);

/**
* User (client) to ping
*
* @param user the user
* @return this pointer
*/
PingClient user(ApiBaseUser user);

/**
* start schedule
*/
void ping();

/**
* stop schedule after done
*/
void stop();

/**
* stop schedule without waiting for task's done
*/
void stopNow();

/**
* Indicate that the schedule is stopped or not
*
* @return true or false
*/
boolean stopped();

}
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,13 @@ public interface UpdateUserInfo {
* Remove all user variables
*/
void removeAllVariables();

/**
* Disconnect user from server
*
* IDLE(0), KICK(1), BAN(2), UNKNOWN(3);
*
* @param reasonId the reason id
*/
void disconnect(byte reasonId);
}
14 changes: 14 additions & 0 deletions src/main/java/com/tvd12/ezyfox/core/constants/ApiRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
*
*/
package com.tvd12.ezyfox.core.constants;

/**
* @author tavandung12
*
*/
public interface ApiRequest {

static final String PING = "ping";

}

0 comments on commit 76acc13

Please sign in to comment.