
SSC一般指共享服务中心
作为一种战略性业务架构,共享服务以客户服务和持续改进的文化为核心,实现价值导向服务,促使组织在更大范围内,甚至在全球范围内能够集中精力于其核心能力,从而使各业务单元创造更多的附加价值。
最早使用共享服务中心这一管理模式的是美国福特公司,20世纪80年代初,福特就在欧洲成立了财务服务共享中心。随后,杜邦和通用电气也在80年代后期建立了相似的机构。
90年代初期,惠普、道尔、和IBM也相继做出这样的决定。国内企业海尔集团、新奥集团、中国网通等也正在使用共享服务中心管理模式。
扩展资料:
SSC的优势:
建立共享服务中心的首要驱动因素是成本降低。成本的降低有两种情况:一是在业务量不增加的情况下人员要减少,这是非常直观的成本降低;还有一种情况,是业务量增加而人员不增加。
这是一个相对的节省。作为成长型的公司,业务总是在增加而且增长的速度很快,管理层希望在业务规模增加的同时,人员可以有少量的增加或者不增加。
通过集中规模把复杂的工作变得更简单、更标准、分工更细,工作效率和质量将进一步提高。在共享服务的模式下,各种职能实施的政策、工作流程、检查标准完全统一,工作的效率获得显著提升。
信息的集中管理共享应用,实现了资源集中调度下的风险集中控制。在共享中心,服务是其工作的重心,一切都聚焦在服务上。
在共享服务平台处理一些繁琐、复性强的业务时,各个业务单元能够更专注于自己的核心业务。而且共享服务平台提供了一个标准的工作程序,可避免地区和业务部门之间出现标准执行的偏差。
使更多的管理数据在统一标准下得以比较,这无疑是公司管理层、董事会取信于股东的利好因素。另外,作为一个服务中心,可以在比较短的时间内,开发出更专业的技术标准,并在组织内得到推广。
参考资料来源:百度百科-SSC
今天太晚了,改天给你做一个,记得提醒我,这个如果只是要个简单的,我半个小时就搞定了给我个邮箱
现在给贴出我的代码: 整个结构分两个工程
1。服务端工程NioServer.java: 采用nio 方式的异步socket通信,不仅可以实现你的服务器还可以让你多学习一下什么是nio
2。客户端工程UserClient.java: 采用Swing技术画了一个简单的UI界面,比较土,原因是我没那么多时间去设计界面,你需要的话可以自己去修改得漂亮点,相信不难
现在贴工程1:
package com.net
import java.io.IOException
import java.net.InetSocketAddress
import java.net.ServerSocket
import java.nio.ByteBuffer
import java.nio.channels.SelectionKey
import java.nio.channels.Selector
import java.nio.channels.ServerSocketChannel
import java.nio.channels.SocketChannel
import java.util.Iterator
import java.util.Set
public class NioServer {
public static final int SERVERPORT=5555
public static final String USERNAME="wangzhirong"
public static final String PASSWORD="123456"
public static final String ISACK="ACK"
public static final String ISNAK="NAK!"
// Selector selector//选择器
// SelectionKey key//key。 一个key代表一个Selector 在NIO通道上的注册,类似主键
// //取得这个Key后就可以对Selector在通道上进行 *** 作
private ByteBuffer echoBuffer = ByteBuffer.allocate( 1024 )// 通道数据缓冲区
public NioServer(){
}
public static void main(String[] args) throws IOException {
NioServer ns=new NioServer()
ns.BuildNioServer()
}
public void BuildNioServer() throws IOException{
/////////////////////////////////////////////////////////
///////先对服务端的ServerSocket进行注册,注册到Selector ////
/////////////////////////////////////////////////////////
ServerSocketChannel ssc = ServerSocketChannel.open()//新建NIO通道
ssc.configureBlocking( false )//使通道为非阻塞
ServerSocket ss = ssc.socket()//创建基于NIO通道的socket连接
//新建socket通道的端口
ss.bind(new InetSocketAddress("127.0.0.1",SERVERPORT))
Selector selector=Selector.open()//获取一个选择器
//将NIO通道选绑定到择器,当然绑定后分配的主键为skey
SelectionKey skey = ssc.register( selector, SelectionKey.OP_ACCEPT )
////////////////////////////////////////////////////////////////////
//// 接收客户端的连接Socket,并将此Socket也接连注册到Selector ////
///////////////////////////////////////////////////////////////////
while(true){
int num = selector.select()//获取通道内是否有选择器的关心事件
if(num<1){continue}
Set selectedKeys = selector.selectedKeys()//获取通道内关心事件的集合
Iterator it = selectedKeys.iterator()
while (it.hasNext()) {//遍历每个事件
try{
SelectionKey key = (SelectionKey)it.next()
//有一个新联接接入事件,服务端事件
if ((key.readyOps() &SelectionKey.OP_ACCEPT)
== SelectionKey.OP_ACCEPT) {
// 接收这个新连接
ServerSocketChannel serverChanel = (ServerSocketChannel)key.channel()
//从serverSocketChannel中创建出与客户端的连接socketChannel
SocketChannel sc = serverChanel.accept()
sc.configureBlocking( false )
// Add the new connection to the selector
// 把新连接注册到选择器
SelectionKey newKey = sc.register( selector,
SelectionKey.OP_READ )
it.remove()
System.out.println( "Got connection from "+sc )
}else
//读客户端数据的事件,此时有客户端发数据过来,客户端事件
if((key.readyOps() &SelectionKey.OP_READ)
== SelectionKey.OP_READ){
// 读取数据
SocketChannel sc = (SocketChannel)key.channel()
int bytesEchoed = 0
while((bytesEchoed = sc.read(echoBuffer))>0){
System.out.println("bytesEchoed:"+bytesEchoed)
}
echoBuffer.flip()
System.out.println("limet:"+echoBuffer.limit())
byte [] content = new byte[echoBuffer.limit()]
echoBuffer.get(content)
String result=new String(content)
doPost(result,sc)
echoBuffer.clear()
it.remove()
}
}catch(Exception e){}
}
}
}
public void doPost(String str,SocketChannel sc){
boolean isok=false
int index=str.indexOf('|')
if(index>0){
String name=str.substring(0,index)
String pswd=str.substring(index+1)
if(pswd==null){pswd=""}
if(name!=null){
if(name.equals(USERNAME)
&&pswd.equals(PASSWORD)
){
isok=true
}else{
isok=false
}
}else{
isok=false
}
}else{
isok=false
}
String result=""
if(isok){
result="ACK"
}else{
result="NAK!"
}
ByteBuffer bb = ByteBuffer.allocate( result.length() )
bb.put(result.getBytes())
bb.flip()
try {
sc.write(bb)
} catch (IOException e) {
e.printStackTrace()
}
bb.clear()
}
}
下面贴工程2
import java.awt.Color
import java.awt.Dimension
import java.awt.event.ActionEvent
import java.awt.event.ActionListener
import java.io.IOException
import java.io.InputStream
import java.io.OutputStream
import java.net.Socket
import java.net.UnknownHostException
import javax.swing.JButton
import javax.swing.JFrame
import javax.swing.JLabel
import javax.swing.JPanel
import javax.swing.JPasswordField
import javax.swing.JTextField
public class UserClient implements ActionListener{
JFrame jf
JPanel jp
JLabel label_name
JLabel label_pswd
JTextField userName
JButton jb
JPasswordField paswrd
JLabel hintStr
public UserClient (){
jf=new JFrame("XXX 登陆系统")
jp=new JPanel()
jf.setContentPane(jp)
jf.setPreferredSize(new Dimension(350,220))
jp.setPreferredSize(new Dimension(350,220))
jp.setBackground(Color.gray)
label_name=new JLabel()
label_name.setPreferredSize(new Dimension(150,30))
label_name.setText("请输入帐户(数字或英文):")
userName=new JTextField()
userName.setPreferredSize(new Dimension(150,30))
jp.add(label_name)
jp.add(userName)
label_pswd=new JLabel()
label_pswd.setPreferredSize(new Dimension(150,30))
label_pswd.setText("请输入密码:")
jp.add(label_pswd)
paswrd=new JPasswordField()
paswrd.setPreferredSize(new Dimension(150,30))
jp.add(paswrd)
jb=new JButton("OK")
jb.setPreferredSize(new Dimension(150,30))
jb.setText("确 定")
jb.addActionListener( this)
jp.add(jb)
hintStr=new JLabel()
hintStr.setPreferredSize(new Dimension(210,40))
hintStr.setText("")
hintStr.setForeground(Color.RED)
jp.add(hintStr)
jf.pack()
jf.setVisible(true)
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
}
private String name
private String pswd
public void actionPerformed(ActionEvent e) {
name=userName.getText().trim()
pswd=new String(paswrd.getPassword())
if(pswd==null){
pswd=""
}else{
pswd=pswd.trim()
}
if(name!=null &&name.length()>0){
hintStr.setText("正在验证客户端,请稍候...")
start()
}
}
OutputStream os
Socket s
InputStream is
public void start(){
//建立联网线程
new Thread(new Runnable(){
public void run() {
try {
s=new Socket("127.0.0.1",5555)
//写
os=s.getOutputStream()
os.write(name.getBytes())
os.write('|')//用户名与密码用"|"分隔
os.write(pswd.getBytes())
os.flush()
//读内容
Thread.sleep(1000)
is=s.getInputStream()
int len=is.available()
System.out.println("len:"+len)
byte[] bytes=new byte[len]
is.read(bytes)
String resut=new String(bytes)
System.out.println("resut:"+resut)
//TODO 这里通过返回结果处理
if(resut.equals("ACK")){
hintStr.setText("验证成功,欢迎光临!")
}else{
paswrd.setText(null)
hintStr.setText("用户名或密码错误,请重新输入")
}
} catch (UnknownHostException e) {
e.printStackTrace()
} catch (IOException e) {
e.printStackTrace()
} catch (InterruptedException e) {
e.printStackTrace()
}finally{
// try {
// os.close()
// is.close()
// s.close()
// } catch (IOException e) {
// e.printStackTrace()
// }
}
}
}).start()
}
public static void main(String[] args) {
new UserClient()
}
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)