You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Samuel Doyle <sd...@yahoo.com> on 2006/04/27 02:18:39 UTC

What happened to SocketConnector.setConnectTimeout ?

Where did this go? What should I use to replace it?

Thanks, S.D.

Re: What happened to SocketConnector.setConnectTimeout ?

Posted by Trustin Lee <tr...@gmail.com>.
On 4/27/06, Samuel Doyle <sd...@yahoo.com> wrote:
>
> Alright I assume this is how you do it. Can someone
> confirm?
>
> IoConnector connector = new SocketConnector()
> BaseIoConnectorConfig connectorConfig = new
> SocketConnectorConfig();
>
> connectorConfig.setConnectTimeout( connectTimeOut );
> connector.connect( host, sessionHandler,
> connectorConfig );


BaseIoConnectorConfig is an internal support class.  Please don't use it.

IoConnectorConfig connectorConfig = new SocketConnectorConfig();

will suffice.

Otherwise, if you want to just override the default configuration for the
connector you created:

connector,getDefaultConfig().setConnectTimeout( connectTimeout );

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Re: What happened to SocketConnector.setConnectTimeout ?

Posted by Samuel Doyle <sd...@yahoo.com>.
Hi, 

Yes I do something similar to handle legacy client -->
mina connections. The socketconnecor is required to go
from mina --> legacy server, well at least that is
what I assume based on looking at examples and apis.
I'm using mina to act as a proxy server.

S.D.


--- Enrique Rodriguez <en...@gmail.com> wrote:

> Samuel Doyle wrote:
> > Alright I assume this is how you do it. Can
> someone
> > confirm?
> > 
> > IoConnector connector = new SocketConnector()
> > BaseIoConnectorConfig connectorConfig = new
> > SocketConnectorConfig();
> > 
> > connectorConfig.setConnectTimeout( connectTimeOut
> );
> > connector.connect( host, sessionHandler,
> > connectorConfig );
> 
> I've been doing:
> 
>      private IoAcceptor acceptor;
>      private IoHandler handler;
> 
>      handler = new KerberosProtocolHandler();
>      acceptor.bind( new InetSocketAddress( port ),
> handler );
> 
> Enrique
> 


Re: What happened to SocketConnector.setConnectTimeout ?

Posted by Enrique Rodriguez <en...@gmail.com>.
Samuel Doyle wrote:
> Alright I assume this is how you do it. Can someone
> confirm?
> 
> IoConnector connector = new SocketConnector()
> BaseIoConnectorConfig connectorConfig = new
> SocketConnectorConfig();
> 
> connectorConfig.setConnectTimeout( connectTimeOut );
> connector.connect( host, sessionHandler,
> connectorConfig );

I've been doing:

     private IoAcceptor acceptor;
     private IoHandler handler;

     handler = new KerberosProtocolHandler();
     acceptor.bind( new InetSocketAddress( port ), handler );

Enrique

Re: What happened to SocketConnector.setConnectTimeout ?

Posted by Samuel Doyle <sd...@yahoo.com>.
Alright I assume this is how you do it. Can someone
confirm?

IoConnector connector = new SocketConnector()
BaseIoConnectorConfig connectorConfig = new
SocketConnectorConfig();

connectorConfig.setConnectTimeout( connectTimeOut );
connector.connect( host, sessionHandler,
connectorConfig );

Thanks, S.D.


--- Samuel Doyle <sd...@yahoo.com> wrote:

> It appears that the SocketConnector parent class 
> org.apache.mina.common.support.DelegatedIoConnector
> is
> missing from the javadocs.
> 
> S.D.
> 
> --- Samuel Doyle <sd...@yahoo.com> wrote:
> 
> > Where did this go? What should I use to replace
> it?
> > 
> > Thanks, S.D.
> > 
> 
> 


Re: What happened to SocketConnector.setConnectTimeout ?

Posted by Samuel Doyle <sd...@yahoo.com>.
It appears that the SocketConnector parent class 
org.apache.mina.common.support.DelegatedIoConnector is
missing from the javadocs.

S.D.

--- Samuel Doyle <sd...@yahoo.com> wrote:

> Where did this go? What should I use to replace it?
> 
> Thanks, S.D.
>