public interface JobCenter
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT |
Modifier and Type | Method and Description |
---|---|
void |
autoMatch()
自动进行匹配,如果有匹配成功的,则予以触发执行
|
Warehouse |
doWork(Work work)
执行一项工作,期望同步得到结果或异常 如果没有合适的工人或包工头进行处理,马上会抛出异常
|
List<Foreman> |
getForeman(String type)
返回组织某种工作的的空闲工头列表
|
RmiServer |
getRmiServer() |
List<Worker> |
getWorkerList(Work work)
返回具有某种类型的空闲且愿意接受工作的工人列表
|
List<Work> |
getWorkList()
返回所有的工作列表
|
List<Work> |
getWorkList(String type,
WorkStatus workStatus)
返回某种类型的某种状态的工作列表
|
WorkQueue |
getWorkQueue()
返回工作队列对象
|
WorkStatus |
getWorkStatus(Work work)
返回指定工作的工作状态
|
void |
registerForeman(Foreman foreman)
注册包工头
|
void |
registerWork(Work work)
注册一份工作,工作情况不需要马上关注。因此也就不用等待,马上返回可以进行其它处理
如果有返回结果,可以通过异步方式,,异步方式可以用后续工作的方式来指定
|
void |
registerWorker(Worker worker)
注册工人
|
void |
setRmiServer(RmiServer rmiServer) |
void |
stop()
职业介绍所关门
|
void |
unregisterForeMan(Foreman foreman)
注销包工头
|
void |
unregisterWork(Work work)
取消工作,在工作没有分配出去之前,可以从职介所注消工作,如果工作已经分配出去,则无法注消
|
void |
unregisterWorker(Worker worker)
注消工人
|
static final int DEFAULT_PORT
RmiServer getRmiServer()
void setRmiServer(RmiServer rmiServer) throws RemoteException
RemoteException
void registerWorker(Worker worker) throws RemoteException
worker
- RemoteException
void unregisterWorker(Worker worker) throws RemoteException
worker
- RemoteException
WorkQueue getWorkQueue()
List<Work> getWorkList() throws RemoteException
RemoteException
List<Worker> getWorkerList(Work work) throws RemoteException
RemoteException
List<Work> getWorkList(String type, WorkStatus workStatus) throws RemoteException
RemoteException
void registerWork(Work work) throws IOException
work
- IOException
void unregisterWork(Work work) throws RemoteException
work
- RemoteException
Warehouse doWork(Work work) throws IOException
work
- IOException
WorkStatus getWorkStatus(Work work) throws RemoteException
work
- RemoteException
void registerForeman(Foreman foreman) throws RemoteException
foreman
- RemoteException
void unregisterForeMan(Foreman foreman) throws RemoteException
foreman
- RemoteException
List<Foreman> getForeman(String type) throws RemoteException
type
- RemoteException
void autoMatch() throws IOException
IOException
void stop() throws RemoteException
RemoteException
Copyright © 2006–2018 TinyGroup. All rights reserved.