parent
e42e9b9554
commit
4d8078c6c1
@ -0,0 +1,54 @@
|
|||||||
|
package com.platform.entities;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class volumeMoveForm {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private FolderNode selectNode;
|
||||||
|
|
||||||
|
private List<DataInfoEntity> selectItems;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the name
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param name the name to set
|
||||||
|
*/
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the selectNode
|
||||||
|
*/
|
||||||
|
public FolderNode getSelectNode() {
|
||||||
|
return selectNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param selectNode the selectNode to set
|
||||||
|
*/
|
||||||
|
public void setSelectNode(FolderNode selectNode) {
|
||||||
|
this.selectNode = selectNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the selectItems
|
||||||
|
*/
|
||||||
|
public List<DataInfoEntity> getSelectItems() {
|
||||||
|
return selectItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param selectItems the selectItems to set
|
||||||
|
*/
|
||||||
|
public void setSelectItems(List<DataInfoEntity> selectItems) {
|
||||||
|
this.selectItems = selectItems;
|
||||||
|
}
|
||||||
|
}
|
@ -1,51 +0,0 @@
|
|||||||
package com.platform.websocket;
|
|
||||||
|
|
||||||
import org.springframework.web.socket.CloseStatus;
|
|
||||||
import org.springframework.web.socket.TextMessage;
|
|
||||||
import org.springframework.web.socket.WebSocketHandler;
|
|
||||||
import org.springframework.web.socket.WebSocketMessage;
|
|
||||||
import org.springframework.web.socket.WebSocketSession;
|
|
||||||
|
|
||||||
public class SystemWebSocketHandler implements WebSocketHandler {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterConnectionClosed(WebSocketSession arg0, CloseStatus arg1)
|
|
||||||
throws Exception {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void afterConnectionEstablished(WebSocketSession arg0)
|
|
||||||
throws Exception {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleMessage(WebSocketSession arg0, WebSocketMessage<?> arg1)
|
|
||||||
throws Exception {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
TextMessage returnMessage = new TextMessage("received at server");
|
|
||||||
sendMessageToUsers(returnMessage);
|
|
||||||
System.out.println("接到请求");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleTransportError(WebSocketSession arg0, Throwable arg1)
|
|
||||||
throws Exception {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean supportsPartialMessages() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendMessageToUsers(TextMessage message) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
package com.platform.websocket;
|
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
||||||
import org.springframework.web.socket.WebSocketHandler;
|
|
||||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
|
||||||
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
|
||||||
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
|
|
||||||
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@EnableWebMvc
|
|
||||||
@EnableWebSocket
|
|
||||||
public class WebSocketConfig extends WebMvcConfigurerAdapter implements WebSocketConfigurer {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
registry.addHandler(myHandler(), "/webSocketServer");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public WebSocketHandler myHandler() {
|
|
||||||
return new SystemWebSocketHandler();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue