1 24 25 package org.objectweb.dream.channel; 26 27 import java.io.IOException ; 28 29 import org.objectweb.dream.AbstractComponent; 30 import org.objectweb.fractal.api.NoSuchInterfaceException; 31 import org.objectweb.fractal.api.control.IllegalBindingException; 32 import org.objectweb.fractal.api.control.IllegalLifeCycleException; 33 34 38 public class OpenedSocketManagerMonoPersistentImpl extends AbstractComponent 39 implements 40 OpenedSocket 41 { 42 43 47 protected OpenedSocket delegateOpenedSocketItf; 48 49 53 56 public void openedSocket(SocketState socket) throws IOException , 57 InterruptedException 58 { 59 while (!socket.isClosed()) 60 { 61 delegateOpenedSocketItf.openedSocket(socket); 62 } 63 } 64 65 69 72 public String [] listFc() 73 { 74 return new String []{OpenedSocket.ITF_NAME}; 75 } 76 77 81 public void bindFc(String clientItfName, Object serverItf) 82 throws NoSuchInterfaceException, IllegalBindingException, 83 IllegalLifeCycleException 84 { 85 super.bindFc(clientItfName, serverItf); 86 if (clientItfName.equals(OpenedSocket.ITF_NAME)) 87 { 88 delegateOpenedSocketItf = (OpenedSocket) serverItf; 89 } 90 } 91 } | Popular Tags |